Skip to content

Commit

Permalink
arm64: Mark start_backtrace() notrace and NOKPROBE_SYMBOL
Browse files Browse the repository at this point in the history
[ Upstream commit 1e0924b ]

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: <stable@vger.kernel.org> # 5.13.x
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/164301227374.1433152.12808232644267107415.stgit@devnote2
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mhiramat authored and gregkh committed Mar 8, 2022
1 parent 14ce226 commit 9afc54a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm64/kernel/stacktrace.c
Expand Up @@ -33,7 +33,7 @@
*/


void start_backtrace(struct stackframe *frame, unsigned long fp,
notrace void start_backtrace(struct stackframe *frame, unsigned long fp,
unsigned long pc)
{
frame->fp = fp;
Expand All @@ -55,6 +55,7 @@ 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 9afc54a

Please sign in to comment.