Skip to content

Commit 2d226c1

Browse files
mrutland-armwilldeacon
authored andcommitted
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 <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: James Morse <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent ddb953f commit 2d226c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/entry-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ static void notrace el1_pc(struct pt_regs *regs, unsigned long esr)
3636
}
3737
NOKPROBE_SYMBOL(el1_pc);
3838

39-
static void el1_undef(struct pt_regs *regs)
39+
static void notrace el1_undef(struct pt_regs *regs)
4040
{
4141
local_daif_inherit(regs);
4242
do_undefinstr(regs);
4343
}
4444
NOKPROBE_SYMBOL(el1_undef);
4545

46-
static void el1_inv(struct pt_regs *regs, unsigned long esr)
46+
static void notrace el1_inv(struct pt_regs *regs, unsigned long esr)
4747
{
4848
local_daif_inherit(regs);
4949
bad_mode(regs, 0, esr);

0 commit comments

Comments
 (0)