* [PATCH] riscv: Move the "Call Trace" to dump_backrace().
@ 2023-07-18 2:32 Mina HuiMin-Chou
2023-07-24 7:57 ` Conor Dooley
0 siblings, 1 reply; 2+ messages in thread
From: Mina HuiMin-Chou @ 2023-07-18 2:32 UTC (permalink / raw)
To: linux-riscv
Cc: paul.walmsley, palmer, aou, chenhuang5, tim609, dylan, minachou, az70021
From: Hui Min Mina Chou <minachou@andestech.com>
It would be appropriate to show "Call Trace" within the dump_backtrace
function to ensure that some kernel dumps include this information.
This patch is based on Chen Huang's comment [1] and Palmer Dabbelt's
patch [2].
[1] https://lore.kernel.org/lkml/mhng-75c14e1e-a23c-404b-a1f6-235e53bdb6f3@palmerdabbelt-glaptop/
[2] https://lore.kernel.org/lkml/20220419174842.488-1-palmer@rivosinc.com/
Signed-off-by: Hui Min Mina Chou <minachou@andestech.com>
---
arch/riscv/kernel/stacktrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c
index 64a9c093aef9..ff136031a592 100644
--- a/arch/riscv/kernel/stacktrace.c
+++ b/arch/riscv/kernel/stacktrace.c
@@ -118,12 +118,12 @@ static bool print_trace_address(void *arg, unsigned long pc)
noinline void dump_backtrace(struct pt_regs *regs, struct task_struct *task,
const char *loglvl)
{
+ pr_cont("%sCall Trace:\n", loglvl);
walk_stackframe(task, regs, print_trace_address, (void *)loglvl);
}
void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
{
- pr_cont("%sCall Trace:\n", loglvl);
dump_backtrace(NULL, task, loglvl);
}
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] riscv: Move the "Call Trace" to dump_backrace().
2023-07-18 2:32 [PATCH] riscv: Move the "Call Trace" to dump_backrace() Mina HuiMin-Chou
@ 2023-07-24 7:57 ` Conor Dooley
0 siblings, 0 replies; 2+ messages in thread
From: Conor Dooley @ 2023-07-24 7:57 UTC (permalink / raw)
To: Mina HuiMin-Chou
Cc: linux-riscv, paul.walmsley, palmer, aou, chenhuang5, tim609,
dylan, az70021, alex
[-- Attachment #1.1: Type: text/plain, Size: 1779 bytes --]
On Tue, Jul 18, 2023 at 10:32:01AM +0800, Mina HuiMin-Chou wrote:
> From: Hui Min Mina Chou <minachou@andestech.com>
>
> It would be appropriate to show "Call Trace" within the dump_backtrace
> function to ensure that some kernel dumps include this information.
>
> This patch is based on Chen Huang's comment [1] and Palmer Dabbelt's
> patch [2].
>
> [1] https://lore.kernel.org/lkml/mhng-75c14e1e-a23c-404b-a1f6-235e53bdb6f3@palmerdabbelt-glaptop/
> [2] https://lore.kernel.org/lkml/20220419174842.488-1-palmer@rivosinc.com/
Is this change still appropriate? It was cited as a fix for syzkaller
but a year has passed since then and it may not be required.
Alex, do you know?
>
> Signed-off-by: Hui Min Mina Chou <minachou@andestech.com>
> ---
> arch/riscv/kernel/stacktrace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c
> index 64a9c093aef9..ff136031a592 100644
> --- a/arch/riscv/kernel/stacktrace.c
> +++ b/arch/riscv/kernel/stacktrace.c
> @@ -118,12 +118,12 @@ static bool print_trace_address(void *arg, unsigned long pc)
> noinline void dump_backtrace(struct pt_regs *regs, struct task_struct *task,
> const char *loglvl)
> {
> + pr_cont("%sCall Trace:\n", loglvl);
> walk_stackframe(task, regs, print_trace_address, (void *)loglvl);
> }
>
> void show_stack(struct task_struct *task, unsigned long *sp, const char *loglvl)
> {
> - pr_cont("%sCall Trace:\n", loglvl);
> dump_backtrace(NULL, task, loglvl);
> }
>
> --
> 2.34.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-24 7:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-18 2:32 [PATCH] riscv: Move the "Call Trace" to dump_backrace() Mina HuiMin-Chou
2023-07-24 7:57 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).