From 4af9368550d575f8d7ed637a349b642b5ee4945f Mon Sep 17 00:00:00 2001 From: Huang Yiwei Date: Mon, 15 Jan 2024 15:57:59 +0800 Subject: [PATCH] ANDROID: arm64: stacktrace: Export arch_stack_walk symbol The current dump_backtrace() will directly dump stack info to kernel log, but in some cases, we need to save stack info in reserved buffer to keep it clean and avoid being overwritten. Export arch_stack_walk symbol to allow vendor modules to dump stack with customized function to redirect and format the output. Bug: 320201516 Change-Id: If883ba689724a8f1850d6cc925e06593be7884ed Signed-off-by: Huang Yiwei Signed-off-by: Unnathi Chalicheemala --- arch/arm64/kernel/stacktrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 7c1fc6808a4e..e9cfb39f2161 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -293,6 +293,7 @@ noinline noinstr void arch_bpf_stack_walk(bool (*consume_entry)(void *cookie, u6 kunwind_stack_walk(arch_bpf_unwind_consume_entry, &data, current, NULL); } +EXPORT_SYMBOL_GPL(arch_stack_walk); static bool dump_backtrace_entry(void *arg, unsigned long where) {