Skip to content

Commit

Permalink
arm64: Mark start_backtrace() notrace and NOKPROBE_SYMBOL
Browse files Browse the repository at this point in the history
Mark the start_backtrace() as notrace and NOKPROBE_SYMBOL
because this function is called from ftrace and lockdep to
get the caller address via return_address(). The lockdep
is used in kprobes, it should also be NOKPROBE_SYMBOL.

Fixes: b07f349 ("arm64: stacktrace: Move start_backtrace() out of the header")
Cc: <[email protected]> # 5.13.x
Signed-off-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/164301227374.1433152.12808232644267107415.stgit@devnote2
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
mhiramat authored and ctmarinas committed Jan 24, 2022
1 parent eb30d83 commit 1e0924b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/arm64/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
*/


static void start_backtrace(struct stackframe *frame, unsigned long fp,
unsigned long pc)
static notrace void start_backtrace(struct stackframe *frame, unsigned long fp,
unsigned long pc)
{
frame->fp = fp;
frame->pc = pc;
Expand All @@ -55,6 +55,7 @@ static void start_backtrace(struct stackframe *frame, unsigned long fp,
frame->prev_fp = 0;
frame->prev_type = STACK_TYPE_UNKNOWN;
}
NOKPROBE_SYMBOL(start_backtrace);

/*
* Unwind from one frame record (A) to the next frame record (B).
Expand Down

0 comments on commit 1e0924b

Please sign in to comment.