diff options
author | Joey Gouly <joey.gouly@arm.com> | 2024-08-22 17:10:59 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2024-09-04 13:53:44 +0200 |
commit | 7f0ab607630790fa09532dca6202683a0dac19b9 (patch) | |
tree | 2117e0c63e4fd9d3bfc3846a67704be76ea86bfd /arch/arm64/kernel | |
parent | arm64: mask out POIndex when modifying a PTE (diff) | |
download | linux-7f0ab607630790fa09532dca6202683a0dac19b9.tar.xz linux-7f0ab607630790fa09532dca6202683a0dac19b9.zip |
arm64: handle PKEY/POE faults
If a memory fault occurs that is due to an overlay/pkey fault, report that to
userspace with a SEGV_PKUERR.
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20240822151113.1479789-17-joey.gouly@arm.com
[will: Add ESR.FSC check to data abort handler]
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/traps.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 9e22683aa921..9a11bb0db284 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -273,6 +273,12 @@ void arm64_force_sig_fault(int signo, int code, unsigned long far, force_sig_fault(signo, code, (void __user *)far); } +void arm64_force_sig_fault_pkey(unsigned long far, const char *str, int pkey) +{ + arm64_show_signal(SIGSEGV, str); + force_sig_pkuerr((void __user *)far, pkey); +} + void arm64_force_sig_mceerr(int code, unsigned long far, short lsb, const char *str) { |