mm-huge_memory-preserve-pmd_swp_uffd_wp-on-device-private-pmd-downgrade.patch removed from -mm tree
The quilt patch titled
Subject: mm/huge_memory: preserve pmd_swp_uffd_wp on device-private PMD downgrade
has been removed from the -mm tree. Its filename was
mm-huge_memory-preserve-pmd_swp_uffd_wp-on-device-private-pmd-downgrade.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Kiryl Shutsemau (Meta)" <[email protected]>
Subject: mm/huge_memory: preserve pmd_swp_uffd_wp on device-private PMD downgrade
Date: Fri, 29 May 2026 18:23:28 +0100
change_non_present_huge_pmd() rewrites a writable device-private PMD swap entry into a readable one without carrying pmd_swp_uffd_wp() across. The PTE-level change_softleaf_pte() does this correctly; mirror that here, matching what copy_huge_pmd() does for the fork path. Without the carry, a plain mprotect() over a UFFD_WP-marked device-private THP strips the bit and the trap is bypassed on swap-in.
---
mm/huge_memory.c | 2 ++ 1 file changed, 2 insertions(+)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-huge_memory-preserve-pmd_swp_uffd_wp-on-device-private-pmd-downgrade +2 -0
@@ -2565,6 +2565,8 @@ static void change_non_present_huge_pmd( }else if (softleaf_is_device_private_write (entry)) { entry =make_readable_device_private_entry (swp_offset (entry)); newpmd =swp_entry_to_pmd (entry); +if (pmd_swp_uffd_wp (*pmd)) + newpmd =pmd_swp_mkuffd_wp (newpmd); }else { newpmd = *pmd; }
_
Patches currently in -mm which might be from [email protected] are