]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm64: mm: Handle PAN faults on uaccess CPY* instructions
authorKristina Martšenko <kristina.martsenko@arm.com>
Fri, 28 Feb 2025 17:00:05 +0000 (17:00 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 7 Mar 2025 18:28:29 +0000 (18:28 +0000)
commit04a9f771d81c109b3927d224a797dc21e2774a5e
tree85b1eca452d14cde53476164a5decee28120cfdc
parent653884f88777b8858ef438cd8ee6ae4722fd5553
arm64: mm: Handle PAN faults on uaccess CPY* instructions

A subsequent patch will use CPY* instructions to copy between user and
kernel memory. Add handling for PAN faults caused by an intended kernel
memory access erroneously accessing user memory, in order to make it
easier to debug kernel bugs and to keep the same behavior as with
regular loads/stores.

Signed-off-by: Kristina Martšenko <kristina.martsenko@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20250228170006.390100-3-kristina.martsenko@arm.com
[catalin.marinas@arm.com: Folded the extable search into insn_may_access_user()]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/extable.h
arch/arm64/mm/extable.c
arch/arm64/mm/fault.c