summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/exception.h
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2022-09-13 11:17:30 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2022-09-16 12:17:03 +0100
commit0f2cb928a1547ae8f89e80a4b8df2c6c02ae5f96 (patch)
tree771bd30715de015374d8111cfc9e3eb5cfe7c1d2 /arch/arm64/include/asm/exception.h
parent18906ff9af6517c20763ed63dab602a4150794f7 (diff)
downloadlinux-stable-0f2cb928a1547ae8f89e80a4b8df2c6c02ae5f96.tar.gz
linux-stable-0f2cb928a1547ae8f89e80a4b8df2c6c02ae5f96.tar.bz2
linux-stable-0f2cb928a1547ae8f89e80a4b8df2c6c02ae5f96.zip
arm64: consistently pass ESR_ELx to die()
Currently, bug_handler() and kasan_handler() call die() with '0' as the 'err' value, whereas die_kernel_fault() passes the ESR_ELx value. For consistency, this patch ensures we always pass the ESR_ELx value to die(). As this is only called for exceptions taken from kernel mode, there should be no user-visible change as a result of this patch. For UNDEFINED exceptions, I've had to modify do_undefinstr() and its callers to pass the ESR_ELx value. In all cases the ESR_ELx value had already been read and was available. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Mark Brown <broonie@kernel.org> Cc: Alexandru Elisei <alexandru.elisei@arm.com> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com> Cc: James Morse <james.morse@arm.com> Cc: Will Deacon <will@kernel.org> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220913101732.3925290-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/exception.h')
-rw-r--r--arch/arm64/include/asm/exception.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/exception.h b/arch/arm64/include/asm/exception.h
index d94aecff9690..28c0275666e1 100644
--- a/arch/arm64/include/asm/exception.h
+++ b/arch/arm64/include/asm/exception.h
@@ -58,7 +58,7 @@ asmlinkage void call_on_irq_stack(struct pt_regs *regs,
asmlinkage void asm_exit_to_user_mode(struct pt_regs *regs);
void do_mem_abort(unsigned long far, unsigned long esr, struct pt_regs *regs);
-void do_undefinstr(struct pt_regs *regs);
+void do_undefinstr(struct pt_regs *regs, unsigned long esr);
void do_bti(struct pt_regs *regs);
void do_debug_exception(unsigned long addr_if_watchpoint, unsigned long esr,
struct pt_regs *regs);