]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
arm64: entry: mark entry code as noinstr
authorMark Rutland <mark.rutland@arm.com>
Mon, 30 Nov 2020 11:59:42 +0000 (11:59 +0000)
committerWill Deacon <will@kernel.org>
Mon, 30 Nov 2020 12:11:37 +0000 (12:11 +0000)
commitda192676483232a0a9478c89cdddd412e5167470
tree42a68598f266955fe1de71532e4c1aab2d1a3078
parent114e0a684753516ef4b71ccb55a8ebcfa8735edb
arm64: entry: mark entry code as noinstr

Functions in entry-common.c are marked as notrace and NOKPROBE_SYMBOL(),
but they're still subject to other instrumentation which may rely on
lockdep/rcu/context-tracking being up-to-date, and may cause nested
exceptions (e.g. for WARN/BUG or KASAN's use of BRK) which will corrupt
exceptions registers which have not yet been read.

Prevent this by marking all functions in entry-common.c as noinstr to
prevent compiler instrumentation. This also blacklists the functions for
tracing and kprobes, so we don't need to handle that separately.
Functions elsewhere will be dealt with in subsequent patches.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201130115950.22492-4-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/entry-common.c