Thread (24 messages) 24 messages, 6 authors, 2021-10-14

Re: [PATCH 6/7] arch: __get_wchan || STACKTRACE_SUPPORT

From: Josh Poimboeuf <hidden>
Date: 2021-10-14 18:42:00
Also in: linux-hardening, lkml

On Thu, Oct 14, 2021 at 07:07:38PM +0100, Mark Rutland wrote:
On Fri, Oct 08, 2021 at 09:17:07AM -0700, Josh Poimboeuf wrote:
quoted
On Fri, Oct 08, 2021 at 03:45:59PM +0200, Peter Zijlstra wrote:
quoted
quoted
stack_trace_save_tsk() *shouldn't* skip anything unless we've explicitly
told it to via skipnr, because I'd expect that
It's what most archs happen to do today and is what
stack_trace_save_tsk() as implemented using arch_stack_walk() does.
Which is I think the closest to canonical we have.
Ah; and arch_stack_walk() itself shouldn't skip anything, which gives
the consistent low-level semantic I wanted.
quoted
It *is* confusing though.  Even if 'nosched' may be the normally
desired behavior, stack_trace_save_tsk() should probably be named
stack_trace_save_tsk_nosched().
I agree that'd be less confusing!

Josh, am I right in my understanding that the reliable stacktrace
functions *shouldn't* skip sched functions, or should those similarly
gain a _nosched suffix?
Correct, the reliable variants need to see the entire call stack and
therefore they shouldn't skip sched functions.

-- 
Josh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help