Skip to contentSkip to conversation

kvm-s390-fix-missing-present-bit-for-gmap-puds.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Nov 24, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: KVM: s390: fix missing present bit for gmap puds
has been removed from the -mm tree. Its filename was
kvm-s390-fix-missing-present-bit-for-gmap-puds.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: Claudio Imbrenda <[email protected]>
Subject: KVM: s390: fix missing present bit for gmap puds
Date: Tue, 28 Oct 2025 14:01:50 +0100

For hugetlbs, gmap puds have the present bit set. For normal puds (which point to ptes), the bit is not set. This is in contrast to the normal userspace puds, which always have the bit set for present pmds.

This causes issues when ___pte_offset_map() is modified to only check for the present bit.

The solution to the problem is simply to always set the present bit for present gmap pmds.

Cc Alexander Gordeev <[email protected]>
Cc Alistair Popple <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Barry Song <[email protected]>
Cc Byungchul Park <[email protected]>
Cc Danilo Krummrich <[email protected]>
Cc Dave Airlie <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Dev Jain <[email protected]>
Cc Francois Dugast <[email protected]>
Cc Gregory Price <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc "Huang, Ying" <[email protected]>
Cc Joshua Hahn <[email protected]>
Cc Liam Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Mathew Brost <[email protected]>
Cc Mika Penttilä <[email protected]>
Cc Nico Pache <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Rakie Kim <[email protected]>
Cc Ralph Campbell <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Zi Yan <[email protected]>

---

 arch/s390/mm/gmap.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/s390/mm/gmap.c renamed from arch/s390/mm/gmap.c~kvm-s390-fix-missing-present-bit-for-gmap-puds +3 -2
@@ -599,8 +599,9 @@ int __gmap_link(struct gmap *gmap, unsig
 					| _SEGMENT_ENTRY_GMAP_UC
 					| _SEGMENT_ENTRY;
 			} else
-				*table = pmd_val(*pmd) &
-					_SEGMENT_ENTRY_HARDWARE_BITS;
+				*table = (pmd_val(*pmd) &
+					_SEGMENT_ENTRY_HARDWARE_BITS)
+					| _SEGMENT_ENTRY;
 		}
 	} else if (*table & _SEGMENT_ENTRY_PROTECT &&
 		   !(pmd_val(*pmd) & _SEGMENT_ENTRY_PROTECT)) {

_

Patches currently in -mm which might be from [email protected] are