Thread (49 messages) 49 messages, 6 authors, 2021-08-19

Re: [PATCH 1/5] mm: Add support for unaccepted memory

From: Joerg Roedel <hidden>
Date: 2021-08-12 08:20:16
Also in: linux-mm, lkml

On Tue, Aug 10, 2021 at 02:20:08PM -0700, Andi Kleen wrote:
Also I agree with your suggestion that we should get the slow path out of
the zone locks/interrupt disable region. That should be easy enough and is
an obvious improvement.
I also agree that the slow-path needs to be outside of the memory
allocator locks. But I think this conflicts with the concept of
accepting memory in 2MB chunks even if allocation size is smaller.

Given some kernel code allocated 2 pages and the allocator path starts
to validate the whole 2MB page the memory is on, then there are
potential races to take into account.

Either some other code path allocates memory from that page and returns
it before validation is finished or we end up with double validation.
Returning unvalidated memory is a guest-problem and double validation
will cause security issues for SNP guests.

Regards,

	Joerg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help