[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160913182957.GA25373@gmail.com>
Date: Tue, 13 Sep 2016 20:29:57 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...capital.net>,
Steven Rostedt <rostedt@...dmis.org>,
Brian Gerst <brgerst@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Byungchul Park <byungchul.park@....com>,
Nilay Vaish <nilayvaish@...il.com>
Subject: Re: [PATCH v2] x86/dumpstack: allow preemption in
show_stack_log_lvl() and dump_trace()
* Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> show_stack_log_lvl() and dump_trace() are already preemption safe:
>
> - If they're running in irq or exception context, preemption is already
> disabled and the percpu stack pointers can be trusted.
>
> - If they're running with preemption enabled, they must be running on
> the task stack anyway, so it doesn't matter if they're comparing the
> stack pointer against a percpu stack pointer from this CPU or another
> one: either way it won't match.
Yeah, so I'm having second thoughts about this patch. My worry here is: what if we
get preempted in this sequence?
If the kernel is borked real bad then we could get technically correct but really,
really weird looking stack traces if for example the task stack is getting
corrupted or something like that.
Dunno. How long does the worst-case processing here take on a typical x86 system,
does it really matter to scheduling latency?
Thanks,
Ingo
Powered by blists - more mailing lists