]> Git Repo - linux.git/commitdiff
arm64: entry: add missing noinstr
authorMark Rutland <[email protected]>
Wed, 14 Jul 2021 17:28:01 +0000 (18:28 +0100)
committerWill Deacon <[email protected]>
Thu, 15 Jul 2021 16:36:51 +0000 (17:36 +0100)
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: bb8e93a287a5 ("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]>
arch/arm64/kernel/entry-common.c

index 12ce14a98b7c4f9d649968f12aafa14937f31ce8..db8b2e2d02c235e0539510194c65ad9b919b5a91 100644 (file)
@@ -604,7 +604,7 @@ asmlinkage void noinstr el0t_64_fiq_handler(struct pt_regs *regs)
        __el0_fiq_handler_common(regs);
 }
 
-static void __el0_error_handler_common(struct pt_regs *regs)
+static void noinstr __el0_error_handler_common(struct pt_regs *regs)
 {
        unsigned long esr = read_sysreg(esr_el1);
 
This page took 0.048722 seconds and 4 git commands to generate.