Re: [PATCH] mm: thp: Deny THP for guest_memfd and secretmem in file_thp_enabled()
From: David Hildenbrand (Arm)
Date: Wed Feb 11 2026 - 11:36:32 EST
On 2/11/26 17:16, Ackerley Tng wrote:
"David Hildenbrand (Arm)" <david@xxxxxxxxxx> writes:
On 2/11/26 01:58, Ackerley Tng wrote:
Ackerley Tng <ackerleytng@xxxxxxxxxx> writes:
On 6.1.162, secretmem VMAs are skipped since secretmem VMAs are not
anonymous [2].
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/mm/huge_memory.c?h=v6.1.162#n135
Same for 6.6.123 [3].
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/mm/huge_memory.c?h=v6.6.123#n125
It breaks in 6.12.69 [4].
Do you have a reproducer? If so, which behavior does it trigger?
I would assume that we would suddenly have secretmem pages (THP) that
have a directmap. Or some page copy would crash the kernel.
Is there a good way to verify from userspace that the directmap hasn't
been restored? Should I use CONFIG_PTDUMP_DEBUGFS?
Anything that uses GUP must fail on that secretmem memory. Like doing an O_DIRECT read/write or using vmsplice.
--
Cheers,
David