mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 09:41:03 +02:00
s390/mm: Fix handling of vmalloc area in do_secure_storage_access()
Secure storage access exceptions in vmalloc area need to be handled separately since virt_to_phys() does not work on such addresses. Given that there cannot be a valid access let such exceptions fail immediately. The kernel will either fixup or crash. Tested-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>> --- Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
79ef8d384f
commit
a2e5a9d853
|
|
@ -438,6 +438,8 @@ void do_secure_storage_access(struct pt_regs *regs)
|
|||
panic("Unexpected PGM 0x3d with TEID bit 61=0");
|
||||
}
|
||||
if (is_kernel_fault(regs)) {
|
||||
if (is_vmalloc_addr((void *)addr))
|
||||
return handle_fault_error_nolock(regs, 0);
|
||||
folio = virt_to_folio((void *)addr);
|
||||
if (unlikely(!folio_try_get(folio)))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user