]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
arm64: mark idle code as noinstr
authorMark Rutland <mark.rutland@arm.com>
Mon, 30 Nov 2020 11:59:41 +0000 (11:59 +0000)
committerWill Deacon <will@kernel.org>
Mon, 30 Nov 2020 12:11:37 +0000 (12:11 +0000)
commit114e0a684753516ef4b71ccb55a8ebcfa8735edb
tree64675ee4d9a296076729d01728f4d3f88bc4ee90
parentca1314d73eed493c49bb1932c60a8605530db2e4
arm64: mark idle code as noinstr

Core code disables RCU when calling arch_cpu_idle(), so it's not safe
for arch_cpu_idle() or its calees to be instrumented, as the
instrumentation callbacks may attempt to use RCU or other features which
are unsafe to use in this context.

Mark them noinstr to prevent issues.

The use of local_irq_enable() in arch_cpu_idle() is similarly
problematic, and the "sched/idle: Fix arch_cpu_idle() vs tracing" patch
queued in the tip tree addresses that case.

Reported-by: Marco Elver <elver@google.com>
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-3-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/process.c