Skip to content

Commit 24e3f9f

Browse files
hcahcaakpm00
authored andcommitted
mseal sysmap: enable s390
Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on s390, covering the vdso. [hca@linux.ibm.com: update supported architectures] Link: https://lkml.kernel.org/r/20250317131917.1332402-1-hca@linux.ibm.com Link: https://lkml.kernel.org/r/20250311123326.2686682-3-hca@linux.ibm.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Jeff Xu <jeffxu@chromium.org> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Cc: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent b481341 commit 24e3f9f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Documentation/userspace-api/mseal.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ Use cases
143143
the CONFIG_MSEAL_SYSTEM_MAPPINGS seals all system mappings of this
144144
architecture.
145145

146-
The following architectures currently support this feature: x86-64 and arm64.
146+
The following architectures currently support this feature: x86-64, arm64,
147+
and s390.
147148

148149
WARNING: This feature breaks programs which rely on relocating
149150
or unmapping system mappings. Known broken software at the time

arch/s390/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ config S390
137137
select ARCH_SUPPORTS_DEBUG_PAGEALLOC
138138
select ARCH_SUPPORTS_HUGETLBFS
139139
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && CC_IS_CLANG
140+
select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
140141
select ARCH_SUPPORTS_NUMA_BALANCING
141142
select ARCH_SUPPORTS_PER_VMA_LOCK
142143
select ARCH_USE_BUILTIN_BSWAP

arch/s390/kernel/vdso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int map_vdso(unsigned long addr, unsigned long vdso_mapping_len)
8080
vdso_text_start = vvar_start + VDSO_NR_PAGES * PAGE_SIZE;
8181
/* VM_MAYWRITE for COW so gdb can set breakpoints */
8282
vma = _install_special_mapping(mm, vdso_text_start, vdso_text_len,
83-
VM_READ|VM_EXEC|
83+
VM_READ|VM_EXEC|VM_SEALED_SYSMAP|
8484
VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC,
8585
vdso_mapping);
8686
if (IS_ERR(vma)) {

0 commit comments

Comments
 (0)