arm64: entry: mark all entry code as notrace
authorMark Rutland <mark.rutland@arm.com>
Thu, 16 Jan 2020 18:35:46 +0000 (18:35 +0000)
committerWill Deacon <will@kernel.org>
Fri, 17 Jan 2020 13:22:14 +0000 (13:22 +0000)
commit2d226c1e1c194a4737bf17ad8432a479e4e7e4a6
treef00cbf6052993c307b8c5f3cdf79b663dcff9aee
parentddb953f86cfb1ec450eff16a94230fc6d9901552
arm64: entry: mark all entry code as notrace

Almost all functions in entry-common.c are marked notrace, with
el1_undef and el1_inv being the only exceptions. We appear to have done
this on the assumption that there were no exception registers that we
needed to snapshot, and thus it was safe to run trace code that might
result in further exceptions and clobber those registers.

However, until we inherit the DAIF flags, our irq flag tracing is stale,
and this discrepancy could set off warnings in some configurations. For
example if CONFIG_DEBUG_LOCKDEP is selected and a trace function calls
into any flag-checking locking routines. Given we don't expect to
trigger el1_undef or el1_inv unless something is already wrong, any
irqflag warnigns are liable to mask the information we'd actually care
about.

Let's keep things simple and mark el1_undef and el1_inv as notrace.
Developers can trace do_undefinstr and bad_mode if they really want to
monitor these cases.

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>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/entry-common.c