Re: [PATCH] mm: thp: Deny THP for guest_memfd and secretmem in file_thp_enabled()
From: Deepanshu Kartikey
Date: Fri Feb 20 2026 - 23:37:58 EST
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,
The upstream fix is now in mm-unstable and linux-next. Should I send a
backport for 6.12 stable?
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.
Thanks,
Deepanshu