]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: entry: don't instrument entry code with KCOV
authorMark Rutland <mark.rutland@arm.com>
Mon, 7 Jun 2021 09:46:23 +0000 (10:46 +0100)
committerWill Deacon <will@kernel.org>
Mon, 7 Jun 2021 10:35:56 +0000 (11:35 +0100)
commitcc9ace22946fccf86385ee5afdce1a18d7716d7a
tree0e94d5c49177a4e87f7c05c4335a5982c7a56d40
parent456535422a45a82588e3406c843e201241898559
arm64: entry: don't instrument entry code with KCOV

The code in entry-common.c runs at exception entry and return
boundaries, where portions of the kernel environment aren't available.
For example, RCU may not be watching, and lockdep state may be
out-of-sync with the hardware. Due to this, it is not sound to
instrument this code.

We generally avoid instrumentation by marking the entry functions as
`noinstr`, but currently this doesn't inhibit KCOV instrumentation.
Prevent this by disabling KCOV for the entire compilation unit.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210607094624.34689-20-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/Makefile