All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: David Rientjes <rientjes@google.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>, Robert Richter <rric@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Pekka Enberg <penberg@kernel.org>,
	Vegard Nossum <vegard.nossum@gmail.com>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: mm: OS boot failed when set command-line kmemcheck=1
Date: Wed, 26 Feb 2014 09:43:04 +0100	[thread overview]
Message-ID: <20140226084304.GD18404@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1402191422240.31921@chino.kir.corp.google.com>

On Wed, Feb 19, 2014 at 02:24:41PM -0800, David Rientjes wrote:
> On Wed, 19 Feb 2014, Xishi Qiu wrote:
> 
> > Here is a warning, I don't whether it is relative to my hardware.
> > If set "kmemcheck=1 nowatchdog", it can boot.
> > 
> > code:
> > 	...
> > 	pte = kmemcheck_pte_lookup(address);
> > 	if (!pte)
> > 		return false;
> > 
> > 	WARN_ON_ONCE(in_nmi());
> > 
> > 	if (error_code & 2)
> > 	...

That code seems to assume NMI context cannot fault; this is false since
a while back (v3.9 or thereabouts).

> > [   10.920757]  [<ffffffff810452c1>] kmemcheck_fault+0xb1/0xc0
> > [   10.920760]  [<ffffffff814d262b>] __do_page_fault+0x39b/0x4c0
> > [   10.920763]  [<ffffffff814d2829>] do_page_fault+0x9/0x10
> > [   10.920765]  [<ffffffff814cf222>] page_fault+0x22/0x30
> > [   10.920774]  [<ffffffff8101eb02>] intel_pmu_handle_irq+0x142/0x3a0
> > [   10.920777]  [<ffffffff814d0655>] perf_event_nmi_handler+0x35/0x60
> > [   10.920779]  [<ffffffff814cfe83>] nmi_handle+0x63/0x150
> > [   10.920782]  [<ffffffff814cffd3>] default_do_nmi+0x63/0x290
> > [   10.920784]  [<ffffffff814d02a8>] do_nmi+0xa8/0xe0
> > [   10.920786]  [<ffffffff814cf527>] end_repeat_nmi+0x1e/0x2e

And this does indeed show a fault from NMI context; which is totally
expected.

kmemcheck needs to be fixed; but I've no clue how any of that works.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: David Rientjes <rientjes@google.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>, Robert Richter <rric@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Pekka Enberg <penberg@kernel.org>,
	Vegard Nossum <vegard.nossum@gmail.com>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: mm: OS boot failed when set command-line kmemcheck=1
Date: Wed, 26 Feb 2014 09:43:04 +0100	[thread overview]
Message-ID: <20140226084304.GD18404@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1402191422240.31921@chino.kir.corp.google.com>

On Wed, Feb 19, 2014 at 02:24:41PM -0800, David Rientjes wrote:
> On Wed, 19 Feb 2014, Xishi Qiu wrote:
> 
> > Here is a warning, I don't whether it is relative to my hardware.
> > If set "kmemcheck=1 nowatchdog", it can boot.
> > 
> > code:
> > 	...
> > 	pte = kmemcheck_pte_lookup(address);
> > 	if (!pte)
> > 		return false;
> > 
> > 	WARN_ON_ONCE(in_nmi());
> > 
> > 	if (error_code & 2)
> > 	...

That code seems to assume NMI context cannot fault; this is false since
a while back (v3.9 or thereabouts).

> > [   10.920757]  [<ffffffff810452c1>] kmemcheck_fault+0xb1/0xc0
> > [   10.920760]  [<ffffffff814d262b>] __do_page_fault+0x39b/0x4c0
> > [   10.920763]  [<ffffffff814d2829>] do_page_fault+0x9/0x10
> > [   10.920765]  [<ffffffff814cf222>] page_fault+0x22/0x30
> > [   10.920774]  [<ffffffff8101eb02>] intel_pmu_handle_irq+0x142/0x3a0
> > [   10.920777]  [<ffffffff814d0655>] perf_event_nmi_handler+0x35/0x60
> > [   10.920779]  [<ffffffff814cfe83>] nmi_handle+0x63/0x150
> > [   10.920782]  [<ffffffff814cffd3>] default_do_nmi+0x63/0x290
> > [   10.920784]  [<ffffffff814d02a8>] do_nmi+0xa8/0xe0
> > [   10.920786]  [<ffffffff814cf527>] end_repeat_nmi+0x1e/0x2e

And this does indeed show a fault from NMI context; which is totally
expected.

kmemcheck needs to be fixed; but I've no clue how any of that works.

  parent reply	other threads:[~2014-02-26  8:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19  6:56 mm: OS boot failed when set command-line kmemcheck=1 Xishi Qiu
2014-02-19  6:56 ` Xishi Qiu
2014-02-19  7:49 ` David Rientjes
2014-02-19  7:49   ` David Rientjes
2014-02-19  9:35   ` Xishi Qiu
2014-02-19  9:35     ` Xishi Qiu
2014-02-19 22:24     ` David Rientjes
2014-02-19 22:24       ` David Rientjes
2014-02-26  8:12       ` Xishi Qiu
2014-02-26  8:12         ` Xishi Qiu
2014-02-26  8:43       ` Peter Zijlstra [this message]
2014-02-26  8:43         ` Peter Zijlstra
2014-02-26 10:14         ` Vegard Nossum
2014-02-26 10:14           ` Vegard Nossum
2014-02-26 10:30           ` Peter Zijlstra
2014-02-26 10:30             ` Peter Zijlstra
2014-03-12  9:15           ` Xishi Qiu
2014-03-12  9:15             ` Xishi Qiu
2014-02-19 22:14   ` [patch] x86, kmemcheck: Use kstrtoint() instead of sscanf() David Rientjes
2014-02-19 22:14     ` David Rientjes
2014-03-03 13:14     ` Pekka Enberg
2014-03-03 13:14       ` Pekka Enberg
2014-03-04  5:07       ` David Rientjes
2014-03-04  5:07         ` David Rientjes

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=20140226084304.GD18404@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=qiuxishi@huawei.com \
    --cc=rientjes@google.com \
    --cc=rric@kernel.org \
    --cc=vegard.nossum@gmail.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 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.