Re: [PATCH] mm: thp: Deny THP for guest_memfd and secretmem in file_thp_enabled()
From: David Hildenbrand (Arm)
Date: Mon Feb 23 2026 - 03:44:59 EST
On 2/21/26 05:37, Deepanshu Kartikey wrote:
On Fri, Feb 13, 2026 at 2:36 PM David Hildenbrand (Arm)
<david@xxxxxxxxxx> wrote:
For 6.12 stable backport:
- IS_ANON_FILE / S_ANON_INODE does not exist in 6.12, so use
mapping_inaccessible() || secretmem_mapping() in file_thp_enabled()
instead
I think secretmem_mapping() is sufficient there given that guest_memfd
does not apply yet.
But we can discuss the details about the backport once the upstream fix
is in.
Subject: Re: [PATCH v2] mm: thp: deny THP for files on anonymous inodes
Hi David,
Hi!
The upstream fix is now in mm-unstable and linux-next. Should I send a
backport for 6.12 stable?
Wait until it is in Linus' tree. As we CC stable, you should get a notification that applying the patch failed.
In reply to that mail, you can more easily send the backport.
Makes sense. 19bbfe7b5fcc ("fs: add S_ANON_INODE") does not apply cleanly to to 6.12.
Since IS_ANON_FILE / S_ANON_INODE does not exist in 6.12, I was
planning to use secretmem_mapping() in file_thp_enabled() as you
suggested. guest_memfd mmap is not present in 6.12 so only secretmem
needs fixing there.
--
Cheers,
David