public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"paulmck@linux.vnet.ibm.com" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"Wang, Xiaoming" <xiaoming.wang@intel.com>,
	"Li, Zhuangzhi" <zhuangzhi.li@intel.com>,
	"Liu, Chuansheng" <chuansheng.liu@intel.com>
Subject: Re: [PATCH] x86: Remove WARN_ON(in_nmi()) from vmalloc_fault
Date: Wed, 16 Oct 2013 14:51:11 +0200	[thread overview]
Message-ID: <20131016125111.GB2611@gmail.com> (raw)
In-Reply-To: <20131016084219.53deac7a@gandalf.local.home>


* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 16 Oct 2013 08:11:18 +0200
> Ingo Molnar <mingo@kernel.org> wrote:
> 
> > 
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
> > 
> > > Since the NMI iretq nesting has been fixed, there's no reason that
> > > an NMI handler can not take a page fault for vmalloc'd code. No locks
> > > are taken in that code path, and the software now handles nested NMIs
> > > when the fault re-enables NMIs on iretq.
> > > 
> > > Not only that, if the vmalloc_fault() WARN_ON_ONCE() is hit, and that
> > > warn on triggers a vmalloc fault for some reason, then we can go into
> > > an infinite loop (the WARN_ON_ONCE() does the WARN() before updating
> > > the variable to make it happen "once").
> > > 
> > > Reported-by: "Liu, Chuansheng" <chuansheng.liu@intel.com>
> > > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> > 
> > Would be nice to see the warning quoted that triggered this.
> 
> Sure, want me to add this to the change log?

Yeah, that would be helpful - but only the stack trace portion I suspect, 
to make it clear what caused the fault.

The one posted in the thread shows:

[   17.148755]  [<c2825b08>] do_page_fault+0x8/0x10
[   17.153926]  [<c2823066>] error_code+0x5a/0x60
[   17.158905]  [<c2825b00>] ? __do_page_fault+0x4a0/0x4a0
[   17.164760]  [<c208d1a9>] ? module_address_lookup+0x29/0xb0
[   17.170999]  [<c208dddb>] kallsyms_lookup+0x9b/0xb0
[   17.186804]  [<c208def4>] sprint_symbol+0x14/0x20
[   17.192063]  [<c208df1e>] __print_symbol+0x1e/0x40
[   17.197430]  [<c25e00d7>] ? ashmem_shrink+0x77/0xf0
[   17.202895]  [<c25e13e0>] ? logger_aio_write+0x230/0x230
[   17.208845]  [<c205bdf5>] ? up+0x25/0x40
[   17.213242]  [<c2039cb7>] ? console_unlock+0x337/0x440
[   17.218998]  [<c2818236>] ? printk+0x38/0x3a
[   17.223782]  [<c20006d0>] __show_regs+0x70/0x190
[   17.228954]  [<c200353a>] show_regs+0x3a/0x1b0
[   17.233931]  [<c2818236>] ? printk+0x38/0x3a
[   17.238717]  [<c2824182>] arch_trigger_all_cpu_backtrace_handler+0x62/0x80
[   17.246413]  [<c2823919>] nmi_handle.isra.0+0x39/0x60
[   17.252071]  [<c2823a29>] do_nmi+0xe9/0x3f0

So kallsyms_lookup() faulted, while the NMI watchdog triggered a 
show_regs()? How is that possible?

Thanks,

	Ingo

  reply	other threads:[~2013-10-16 12:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 20:39 [PATCH] x86: Remove WARN_ON(in_nmi()) from vmalloc_fault Steven Rostedt
2013-10-16  6:11 ` Ingo Molnar
2013-10-16 12:42   ` Steven Rostedt
2013-10-16 12:51     ` Ingo Molnar [this message]
2013-10-16 13:01       ` Borislav Petkov
2013-10-16 13:03       ` Steven Rostedt
2013-10-17  0:29       ` Liu, Chuansheng
2013-10-16 11:40 ` Frederic Weisbecker
2013-10-16 12:45   ` Steven Rostedt
2013-10-16 13:08     ` Frederic Weisbecker
2013-10-16 13:14       ` Steven Rostedt
2013-10-16 13:28         ` Frederic Weisbecker
2013-10-16 13:37           ` Steven Rostedt
2013-10-16 19:39             ` Paul E. McKenney
2013-10-16 19:36       ` Paul E. McKenney
2013-10-16 19:57         ` Steven Rostedt
2013-10-18 11:54           ` Paul E. McKenney
2013-10-17 13:59         ` Frederic Weisbecker

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=20131016125111.GB2611@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chuansheng.liu@intel.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xiaoming.wang@intel.com \
    --cc=zhuangzhi.li@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox