Re: [PATCH v2] mm/secretmem: don't allow highmem folios
From: Mike Rapoport
Date: Sat Jul 18 2026 - 06:49:35 EST
On Fri, Jul 17, 2026 at 09:48:59AM +0000, Brendan Jackman wrote:
> secretmem_fault() allocates a folio with GFP_HIGHUSER and then calls
> set_direct_map_invalid_noflush() without checking folio_test_highmem().
> This causes a warning and process crash (vibe-coded reproducer in Link
> below):
...
> Link: https://github.com/bjackman/limmat-kernel-nix/commit/7b2acba2d3a5ef01400d493a155beb1d135b6bb5
> Suggested-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Link: https://lore.kernel.org/all/20260704192603.40aa80cf9242b77aa75e8d8d@xxxxxxxxxxxxxxxxxxxx/
> Fixes: 1507f51255c9f ("mm: introduce memfd_secret system call to create "secret" memory areas")
> Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
--
Sincerely yours,
Mike.