Skip to content

Commit 31a7f0f

Browse files
mrutland-armwilldeacon
authored andcommitted
arm64: entry: add missing noinstr
We intend that all the early exception handling code is marked as `noinstr`, but we forgot this for __el0_error_handler_common(), which is called before we have completed entry from user mode. If it were instrumented, we could run into problems with RCU, lockdep, etc. Mark it as `noinstr` to prevent this. The few other functions in entry-common.c which do not have `noinstr` are called once we've completed entry, and are safe to instrument. Fixes: bb8e93a ("arm64: entry: convert SError handlers to C") Signed-off-by: Mark Rutland <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Joey Gouly <[email protected]> Cc: James Morse <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 59f4406 commit 31a7f0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/entry-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ asmlinkage void noinstr el0t_64_fiq_handler(struct pt_regs *regs)
604604
__el0_fiq_handler_common(regs);
605605
}
606606

607-
static void __el0_error_handler_common(struct pt_regs *regs)
607+
static void noinstr __el0_error_handler_common(struct pt_regs *regs)
608608
{
609609
unsigned long esr = read_sysreg(esr_el1);
610610

0 commit comments

Comments
 (0)