linux-stable/arch/s390/mm
Claudio Imbrenda 49a2686add KVM: s390: pv: fix index value of replaced ASCE
[ Upstream commit c2fceb59bb ]

The index field of the struct page corresponding to a guest ASCE should
be 0. When replacing the ASCE in s390_replace_asce(), the index of the
new ASCE should also be set to 0.

Having the wrong index might lead to the wrong addresses being passed
around when notifying pte invalidations, and eventually to validity
intercepts (VM crash) if the prefix gets unmapped and the notifier gets
called with the wrong address.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Fixes: faa2f72cb3 ("KVM: s390: pv: leak the topmost page table when destroy fails")
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20230705111937.33472-3-imbrenda@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-03 10:22:26 +02:00
..
cmm.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
dump_pagetables.c s390: add kfence region to pagetable dumper 2021-07-30 17:09:02 +02:00
extmem.c s390/extmem: return correct segment type in __segment_load() 2023-03-10 09:39:56 +01:00
fault.c s390/mm: do not trigger write fault when vma does not allow VM_WRITE 2022-08-31 17:16:48 +02:00
gmap.c KVM: s390: pv: fix index value of replaced ASCE 2023-08-03 10:22:26 +02:00
hugetlbpage.c hugetlb: pass vma into huge_pte_alloc() and huge_pmd_share() 2021-05-05 11:27:20 -07:00
init.c Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
kasan_init.c s390/kasan: fix large PMD pages address alignment check 2021-08-25 11:03:33 +02:00
maccess.c s390/maccess: fix semantics of memcpy_real() and its callers 2022-08-17 14:24:09 +02:00
Makefile s390: add ARCH_HAS_DEBUG_WX support 2020-09-14 11:38:35 +02:00
mmap.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
page-states.c s390/mm: remove unused cmma functions 2021-08-18 10:01:28 +02:00
pageattr.c s390/mm,pageattr: fix walk_pte_level() early exit 2021-08-25 11:03:34 +02:00
pgalloc.c s390/mm: fix 2KB pgtable release race 2022-01-27 11:05:10 +01:00
pgtable.c s390/mm: use non-quiescing sske for KVM switch to keyed guest 2022-06-25 15:18:40 +02:00
vmem.c s390/vmem: fix empty page tables cleanup under KASAN 2023-03-10 09:39:15 +01:00