]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: entry: add missing noinstr
authorMark Rutland <mark.rutland@arm.com>
Wed, 14 Jul 2021 17:28:01 +0000 (18:28 +0100)
committerWill Deacon <will@kernel.org>
Thu, 15 Jul 2021 16:36:51 +0000 (17:36 +0100)
commitd4cfbffdae0bebd047ead007d60ab6e1b0551bc6
treee529373132c7c1a78cd6c60b00591b96fd855b4a
parentd4c226e64449f6b5dec07ec21dd138e30d0effbf
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: 3c7e35ef6c2a ("arm64: entry: convert SError handlers to C")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210714172801.16475-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/entry-common.c