lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220419174842.488-1-palmer@rivosinc.com>
Date:   Tue, 19 Apr 2022 10:48:42 -0700
From:   Palmer Dabbelt <palmer@...osinc.com>
To:     dvyukov@...gle.com, nogikh@...gle.com, syzkaller@...glegroups.com
Cc:     Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>, aou@...s.berkeley.edu,
        peterz@...radead.org, keescook@...omium.org, jszhang@...nel.org,
        geert@...ux-m68k.org, chenhuang5@...wei.com, changbin.du@...el.com,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Palmer Dabbelt <palmer@...osinc.com>
Subject: [PATCH v1] RISC-V: Move the "Call Trace" to dump_backtrace()

From: Palmer Dabbelt <palmer@...osinc.com>

Our oopses include "Call Trace:", but in a different place than some
other targets do.  This is breaking at least syzkaller, and likely other
bits of tooling that are trying to parse kernel stack traces.

Signed-off-by: Palmer Dabbelt <palmer@...osinc.com>

---

I'm sort of just dead-reckoning this one based on the syzkaller issues
being reported in
<CACT4Y+ZA7CRNfYgPmi6jHTKD9rwvaJy=nh5Gz_c-PFHq3tuziQ@...l.gmail.com>, I
haven't tested this at all.  There's a lot of other stuff here that
arm64 is doing, much of which seems like it could be pulled out into
generic code.  I seem to remember having said that before, though...

I've left this as "Call Trace:" after seeing some patches to convert the
arm/ print from "Call trace:" to "Call Trace:".  I can't find it again
and I remember it sounding like that wasn't necessary, but since we've
already got the capital I see no reason to change it.  That looks to be
the more popular way.

Presumably this will break any tools parsing the current log format, but
given that we've changed it a handful of times and it looks like it's
just blowing up for folks as-is.
---
 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 08d11a53f39e..d5b91c0d1881 100644
--- a/arch/riscv/kernel/stacktrace.c
+++ b/arch/riscv/kernel/stacktrace.c
@@ -108,12 +108,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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ