diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-05-11 13:52:39 +0300 |
|---|---|---|
| committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2026-05-20 10:48:03 +0300 |
| commit | 29f23176e79a52ce4aa09cf1101bc0427aa0e075 (patch) | |
| tree | e39a8f7e89fd8d7f0653952d7a75132d65f4171e | |
| parent | a2cec6863709d6673a025acc066c962b85a75842 (diff) | |
| download | linux-29f23176e79a52ce4aa09cf1101bc0427aa0e075.tar.xz | |
s390/mm: Map empty zero pages read-only
On arm64 the empty zero page is going to be mapped read-only [1].
Do the same for s390 with an explicit set_memory_ro() call.
[1] https://lore.kernel.org/all/20260427153416.2103979-19-ardb+git@google.com/
Suggested-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
| -rw-r--r-- | arch/s390/mm/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 1f72efc2a579..36bd9530db52 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -84,6 +84,8 @@ void __init arch_setup_zero_pages(void) empty_zero_page = (unsigned long)memblock_alloc_or_panic(PAGE_SIZE << order, PAGE_SIZE); zero_page_mask = ((PAGE_SIZE << order) - 1) & PAGE_MASK; + + set_memory_ro(empty_zero_page, 1UL << order); } void __init arch_zone_limits_init(unsigned long *max_zone_pfns) |
