arm64: entry: add missing noinstr
Mark Rutland
reviewerPATCH 1/1 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.
--- arch/arm64/kernel/entry-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Hi Catalin, Will,
This is an oversight with my recent entry rework. Could you please take this for rc2?
Thanks,
Mark.
arch/arm64/kernel/entry-common.c +1 -1
@@ -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);
Signature · 7 lines
2.11.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 8 lines · Mark Rutland
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
noinstrto prevent this.[...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64: entry: add missing noinstr
https://git.kernel.org/arm64/c/31a7f0f6c8f3
Cheers,
Signature · 10 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel