linux-stable/arch/arm64
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
..
boot arm64: dts: marvell: keep SMMU disabled by default for Armada 7040 and 8040 2020-12-30 11:54:14 +01:00
configs arm64: defconfig: Build in CONFIG_GPIO_MXC by default 2020-10-26 15:48:58 +08:00
crypto crypto: arm64/poly1305-neon - reorder PAC authentication with SP update 2020-12-30 11:53:02 +01:00
include arm64: make atomic helpers __always_inline 2021-01-27 11:55:00 +01:00
kernel arm64: entry: remove redundant IRQ flag tracing 2021-01-27 11:55:07 +01:00
kvm KVM: arm64: Don't access PMCR_EL0 when no PMU is available 2021-01-17 14:17:05 +01:00
lib arm64: Change .weak to SYM_FUNC_START_WEAK_PI for arch/arm64/lib/mem*.S 2020-10-30 08:32:31 +00:00
mm arm64: mm: Fix ARCH_LOW_ADDRESS_LIMIT when !CONFIG_ZONE_DMA 2021-01-17 14:17:02 +01:00
net
xen
Kbuild
Kconfig kbuild: Hoist '--orphan-handling' into Kconfig 2020-12-01 22:45:36 +09:00
Kconfig.debug
Kconfig.platforms arm64: berlin: Select DW_APB_TIMER_OF 2020-10-26 10:45:03 +01:00
Makefile arm64: link with -z norelro for LLD or aarch64-elf 2021-01-12 20:18:24 +01:00