All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Vince Weaver <vincent.weaver@maine.edu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	"dvyukov@google.com" <dvyukov@google.com>
Subject: Re: perf: fuzzer BUG: KASAN: stack-out-of-bounds in __unwind_start
Date: Tue, 29 Nov 2016 10:01:41 -0800	[thread overview]
Message-ID: <20161129180141.GY3924@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161129161246.GB24060@pathway.suse.cz>

On Tue, Nov 29, 2016 at 05:12:46PM +0100, Petr Mladek wrote:
> On Tue 2016-11-29 09:09:17, Josh Poimboeuf wrote:
> > On Tue, Nov 29, 2016 at 06:07:34AM -0800, Paul E. McKenney wrote:
> > > On Tue, Nov 29, 2016 at 10:16:50AM +0100, Peter Zijlstra wrote:
> > > > On Mon, Nov 28, 2016 at 11:52:41PM -0600, Josh Poimboeuf wrote:
> > > > > > We used to do that, but the resulting NMIs were problematic on some
> > > > > > platforms.  Perhaps things have gotten better?
> > > > > 
> > > > > Did a little digging on git blame and found the following commit (which
> > > > > seems to be the cause of the KASAN warning and missing stack dump):
> > > > > 
> > > > >   bc1dce514e9b ("rcu: Don't use NMIs to dump other CPUs' stacks")
> > > > > 
> > > > > I presume this commit is still needed because of the NMI printk deadlock
> > > > > issues which were discussed at Kernel Summit.  I guess those issues need
> > > > > to be sorted out before the above commit can be reverted.
> > > > 
> > > > so printk should more or less work from NMI, esp. after:
> > > > 
> > > >   42a0bb3f7138 ("printk/nmi: generic solution for safe printk in NMI")
> > > 
> > > And of course bc1dce514e9b doesn't revert cleanly, but see hand reversion
> > > below.  Also, 42a0bb3f7138's commit log calls out MN10300 and Xtensa as
> > > needing more work.  Has that happened?
> > 
> > Petr M, any idea?
> 
> These two architectures do not support the safe printk in NMI. But
> these architectures also do not implement trigger_all_cpu_backtrace()
> and other trigger_*_backtrace() functions. Therefore these functions
> return false there.
> 
> In fact, only very few architectures implement trigger_*_backtrace().
> And only few of them use NMI (x86, arm, tile). I have just double
> checked that these all use the safe printk in NMI.
> 
> By other words, if trigger_all_cpu_backtrace() or
> trigger_single_cpu_backtrace() returns true, it should be NMI safe
> and you could use it here.

Good, I will upgrade my commit to Signed-off-by, then.

> > > But I really like the fact that RCU CPU stall warnings dump only those
> > > stacks that are likely to be involved, and the patch below goes back
> > > to dumping everyone.  Shouldn't be that hard to fix, though...
> > 
> > There's a new trigger_single_cpu_backtrace() function which can be used
> > for that.
> 
> There is newly also trigger_cpumask_backtrace(struct cpumask *mask)
> where you could select more CPUs using the mask. If this is of any help.

In my experience, there is almost never a large number of CPUs stalling
a given RCU grace period.  But thank you for letting me know about
trigger_cpumask_backtrace(), as it might be useful in the future.

							Thanx, Paul

  reply	other threads:[~2016-11-29 18:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 17:33 perf: fuzzer BUG: KASAN: stack-out-of-bounds in __unwind_start Vince Weaver
2016-11-28 21:54 ` Josh Poimboeuf
2016-11-29  0:40   ` Paul E. McKenney
2016-11-29  5:52     ` Josh Poimboeuf
2016-11-29  9:16       ` Peter Zijlstra
2016-11-29 14:07         ` Paul E. McKenney
2016-11-29 15:09           ` Josh Poimboeuf
2016-11-29 16:12             ` Petr Mladek
2016-11-29 18:01               ` Paul E. McKenney [this message]
2016-11-29 16:51             ` Paul E. McKenney
2016-11-29 17:17               ` Josh Poimboeuf
2016-11-29 17:36                 ` Paul E. McKenney
2016-11-30  9:29                   ` Petr Mladek
2016-11-29 10:28       ` Paul E. McKenney
2016-11-29 12:43       ` Peter Zijlstra
2016-11-29 15:10         ` Paul E. McKenney
2016-11-29 16:29           ` Petr Mladek
2016-11-29 17:10             ` Peter Zijlstra
2016-11-29 19:39               ` Paul E. McKenney
2016-11-29 19:52                 ` Peter Zijlstra
2016-11-29 20:07                   ` Paul E. McKenney
2016-11-29 20:32                     ` Paul E. McKenney
2016-11-30 19:13                       ` Josh Poimboeuf
2016-11-30 19:49                         ` Paul E. McKenney
2016-12-01  5:52                         ` Peter Zijlstra
2016-12-01 12:33                           ` Paul E. McKenney
2016-12-01 16:41                             ` Peter Zijlstra
2016-12-01 17:00                               ` Paul E. McKenney
2016-11-30 10:01               ` Petr Mladek
2016-11-30 11:06                 ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161129180141.GY3924@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=dvyukov@google.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=vincent.weaver@maine.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.