Re: [PATCH 06/21] mm/page_alloc: add __GFP_SENSITIVE and always set it

From: Borislav Petkov

Date: Wed Jan 28 2026 - 10:50:03 EST


On Thu, Oct 02, 2025 at 02:34:33PM +0000, Brendan Jackman wrote:
> On Wed Oct 1, 2025 at 9:18 PM UTC, Dave Hansen wrote:
> > On 9/24/25 07:59, Brendan Jackman wrote:
> >> +#ifdef CONFIG_MITIGATION_ADDRESS_SPACE_ISOLATION
> >> +#define ___GFP_SENSITIVE BIT(___GFP_SENSITIVE_BIT)
> >> +#else
> >> +#define ___GFP_SENSITIVE 0
> >> +#endif
> >
> > This is clearly one of the inflection points of the series.
> >
> > To go any farther with this approach, I think it's critical to get a few
> > acks on this hunk specifically. Well, maybe not formal acked-by's, but
> > at least _clear_ agreement from at least one of:
> >
> > MEMORY MANAGEMENT - PAGE ALLOCATOR
> > M: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > M: Vlastimil Babka <vbabka@xxxxxxx>
> >
> > ... or this approach is dead in the water.
>
> Yep, I agree. This is where the chicken-and-egg thing I mentioned in [0]
> comes into play though...
>
> [0] https://lore.kernel.org/all/DD7SCRK2OJI9.1EJ9GSEH9FHW2@xxxxxxxxxx/

Btw:

./include/linux/sockptr.h: In function ‘memdup_sockptr_noprof’:
./include/linux/gfp_types.h:306:41: error: ‘___GFP_SENSITIVE’ undeclared (first use in this function); did you mean ‘___GFP_SENSITIVE_BIT’?
306 | #define __GFP_SENSITIVE ((__force gfp_t)___GFP_SENSITIVE)
| ^~~~~~~~~~~~~~~~
./include/linux/slab.h:1049:76: note: in definition of macro ‘kmalloc_node_track_caller_noprof’
1049 | __kmalloc_node_track_caller_noprof(PASS_BUCKET_PARAMS(size, NULL), flags, node, caller)
| ^~~~~
./include/linux/sockptr.h:126:19: note: in expansion of macro ‘kmalloc_track_caller_noprof’
126 | void *p = kmalloc_track_caller_noprof(len, GFP_USER | __GFP_NOWARN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/gfp_types.h:390:43: note: in expansion of macro ‘__GFP_SENSITIVE’
390 | __GFP_HARDWALL | __GFP_SENSITIVE)
| ^~~~~~~~~~~~~~~
./include/linux/sockptr.h:126:52: note: in expansion of macro ‘GFP_USER’
126 | void *p = kmalloc_track_caller_noprof(len, GFP_USER | __GFP_NOWARN);
| ^~~~~~~~

Perhaps it is time for a refresh and a new submission huh?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette