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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 02 Apr 2024 15:18:48 +0200
From: Björn Töpel <bjorn@...nel.org>
To: Puranjay Mohan <puranjay12@...il.com>, Paul Walmsley
 <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, Albert Ou
 <aou@...s.berkeley.edu>, linux-riscv@...ts.infradead.org,
 linux-kernel@...r.kernel.org, Björn Töpel
 <bjorn@...osinc.com>
Cc: puranjay12@...il.com
Subject: Re: [PATCH 0/2] riscv: ftrace: make stack walk more robust.

Puranjay Mohan <puranjay12@...il.com> writes:

> The current stack walker in riscv implemented in walk_stackframe() provides
> the PC to a callback function when it unwinds the stacks. This doesn't
> allow implementing stack walkers that need access to more information like
> the frame pointer, etc.
>
> This series makes walk_stackframe() provide a unwinde_state structure to
> callback functions. This structure has all the information that
> walk_stackframe() can provide.
>
> Currently, there are four users of walk_stackframe(): return_address(),
> perf_callchain_kernel(), dump_backtrace(), and __get_wchan(). All of these
> have been converted to use arch_stack_walk() rather than calling
> walk_stackframe() directly.
>
> We need this to implement arch_bpf_stack_walk() that provides a callback
> that needs the FP, SP, and PC. This will be needed for implementing BFP
> exceptions for RISCV.

Hmm, I wonder if it's easier to have these two patches as part of the
BPF exception series, instead of having the dependencies be cross-tree?

> There are no functional changes in this series.
>
> I have tested this by crashing the kernel and looking at the stack trace
> with and without CONFIG_FRAME_POINTER

I have two really minor style nits, but regardless if they're fixed or
not:

Reviewed-by: Björn Töpel <bjorn@...osinc.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ