linux-stable/arch/s390/mm
Claudio Imbrenda a4b30f548a s390/mm: Fix clearing storage keys for huge pages
[ Upstream commit 412050af2e ]

The function __storage_key_init_range() expects the end address to be
the first byte outside the range to be initialized. I.e. end - start
should be the size of the area to be initialized.

The current code works because __storage_key_init_range() will still loop
over every page in the range, but it is slower than using sske_frame().

Fixes: 3afdfca698 ("s390/mm: Clear skeys for newly mapped huge guest pmds")
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20240416114220.28489-3-imbrenda@linux.ibm.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-17 11:55:58 +02:00
..
Makefile s390/extable: move extable related functions to mm/extable.c 2022-03-08 00:33:00 +01:00
cmm.c
dump_pagetables.c s390/mm,ptdump: avoid Kasan vs Memcpy Real markers swapping 2023-03-10 09:33:51 +01:00
extable.c s390/uaccess: use exception handler to zero result on get_user() failure 2022-06-01 12:03:17 +02:00
extmem.c s390/extmem: return correct segment type in __segment_load() 2023-03-10 09:34:04 +01:00
fault.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
gmap.c s390/mm: Fix storage key clearing for guest huge pages 2024-05-17 11:55:58 +02:00
hugetlbpage.c s390/mm: Fix clearing storage keys for huge pages 2024-05-17 11:55:58 +02:00
init.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
kasan_init.c s390/mm: use set_pXd()/set_pte() helper functions everywhere 2022-03-01 21:05:10 +01:00
maccess.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
mmap.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
page-states.c s390/cmma: fix detection of DAT pages 2023-11-28 17:07:14 +00:00
pageattr.c s390/mm,pageattr: don't use pte_val()/pXd_val() as lvalue 2022-03-01 21:05:10 +01:00
pgalloc.c s390/mm: use CRST_ALLOC_ORDER instead of number 2022-02-09 22:56:04 +01:00
pgtable.c KVM: s390/mm: Properly reset no-dat 2023-12-13 18:39:29 +01:00
vmem.c s390/mm: add missing arch_set_page_dat() call to vmem_crst_alloc() 2024-01-10 17:10:30 +01:00