[PATCH 0/2 v2] remove PF_MEMALLOC_NORECLAIM
Theodore Ts'o
tytso at mit.edu
Thu Sep 5 15:24:56 UTC 2024
On Thu, Sep 05, 2024 at 10:05:15AM -0400, Kent Overstreet wrote:
> > That may be the currrent state of affiars; but is it
> > ****guaranteed**** forever and ever, amen, that GFP_KERNEL will never
> > fail if the amount of memory allocated was lower than a particular
> > multiple of the page size? If so, what is that size? I've checked,
> > and this is not documented in the formal interface.
>
> Yeah, and I think we really need to make that happen, in order to head
> off a lot more sillyness in the future.
I don't think there's any "sillyness"; I hear that you believe that
it's silly, but I think what we have is totally fine.
I've done a quick check of ext4, and we do check the error returns in
most if not all of the calls where we pass in __GFP_NOFAIL and/or are
small allocations less than the block size. We won't crash if someone
sends a patch which violates the documented guarantee of __GFP_NOFAIL.
So what's the sillynesss?
In any case, Michal has said ix-nay on making GFP_KERNEL == GFP_NOFAIL
for small allocations as documented guarantee, as opposed to the way
things work today, so as far as I'm concerned, the matter is closed.
- Ted
More information about the Linux-security-module-archive
mailing list