linux-stable/arch
Mark Rutland 93f8cc947b arm64: entry: remove redundant IRQ flag tracing
[ Upstream commit df06824767 ]

All EL0 returns go via ret_to_user(), which masks IRQs and notifies
lockdep and tracing before calling into do_notify_resume(). Therefore,
there's no need for do_notify_resume() to call trace_hardirqs_off(), and
the comment is stale. The call is simply redundant.

In ret_to_user() we call exit_to_user_mode(), which notifies lockdep and
tracing the IRQs will be enabled in userspace, so there's no need for
el0_svc_common() to call trace_hardirqs_on() before returning. Further,
at the start of ret_to_user() we call trace_hardirqs_off(), so not only
is this redundant, but it is immediately undone.

In addition to being redundant, the trace_hardirqs_on() in
el0_svc_common() leaves lockdep inconsistent with the hardware state,
and is liable to cause issues for any C code or instrumentation
between this and the call to trace_hardirqs_off() which undoes it in
ret_to_user().

This patch removes the redundant tracing calls and associated stale
comments.

Fixes: 23529049c6 ("arm64: entry: fix non-NMI user<->kernel transitions")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210107145310.44616-1-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-27 11:55:07 +01:00
..
alpha local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arc arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC 2021-01-19 18:27:26 +01:00
arm xen: Fix event channel callback via INTX/GSI 2021-01-27 11:55:00 +01:00
arm64 arm64: entry: remove redundant IRQ flag tracing 2021-01-27 11:55:07 +01:00
c6x
csky local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
h8300 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
hexagon local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
ia64 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
m68k local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
microblaze local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
mips MIPS: relocatable: fix possible boot hangup with KASLR enabled 2021-01-19 18:27:20 +01:00
nds32 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
nios2 sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
openrisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
parisc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
powerpc powerpc: Fix alignment bug within the init sections 2021-01-27 11:55:07 +01:00
riscv RISC-V: Fix maximum allowed phsyical memory for RV32 2021-01-27 11:55:04 +01:00
s390 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
sh local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
sparc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
um um: ubd: Submit all data segments atomically 2021-01-06 14:56:55 +01:00
x86 x86/xen: fix 'nopvspin' build error 2021-01-27 11:55:04 +01:00
xtensa local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
.gitignore
Kconfig fanotify: Fix sys_fanotify_mark() on native x86-32 2021-01-17 14:16:59 +01:00