mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
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>
This commit is contained in:
parent
a2cec68637
commit
29f23176e7
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user