From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
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 12:39:47 -0700 [thread overview]
Message-ID: <20131016193947.GI4553@linux.vnet.ibm.com> (raw)
In-Reply-To: <20131016093712.0d258870@gandalf.local.home>
On Wed, Oct 16, 2013 at 09:37:12AM -0400, Steven Rostedt wrote:
> On Wed, 16 Oct 2013 15:28:15 +0200
> Frederic Weisbecker <fweisbec@gmail.com> wrote:
>
> > On Wed, Oct 16, 2013 at 09:14:37AM -0400, Steven Rostedt wrote:
> > > On Wed, 16 Oct 2013 15:08:57 +0200
> > > Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > >
> > >
> > > > Faults can call rcu_user_exit() / rcu_user_enter(). This is not supposed to happen
> > > > between rcu_nmi_enter() and rcu_nmi_exit(). rdtp->dynticks would be incremented in the
> > > > wrong way.
> > > >
> > > > Ah but we have an in_interrupt() check in context_tracking_user_enter() that protects
> > > > us against that.
> > >
> > > I will say that we should probably warn if it's any fault other than a
> > > vmalloc fault. A vmalloc fault should only happen in kernel space, and
> > > should not be happening from user code.
> >
> > The NMI can interrupt userspace. When the fault happens, it sees that context tracking
> > state is set to userspace (NMIs and interrupts in general don't exit that state, hence
> > the in_interrupt() check that returns when user_exit/enter is called) so it calls user_enter().
> > But anyway we should be protected against that.
>
> IIRC, NMI itself is safe to use rcu_read_lock(), at least I remember
> Paul making sure that stuff was lockless and NMI safe.
Yep, even preemptible RCU. This relies on the fact that we cannot be
preempted within either an NMI handler or an exception handler.
> > > The WARN_ON() that I removed is from vmalloc fault. I don't see an
> > > issue with NMIs faulting via vmalloc. For any other page fault, sure, I
> > > would be concerned about it. But what's wrong with an NMI running
> > > module code?
> >
> > I won't argue further as none of us is going to change his opinion on this :)
>
> Sure sure, yet another argument continues with two sides stubbornly
> refusing to negotiate about a looming future (de)fault!
I figure some good hard testing will bring the truth of the matter to light.
The arguing parties might well then wish that they had compromised so as
to avoid the hard sharp truth, but by then it will be too late. ;-)
Thanx, Paul
next prev parent reply other threads:[~2013-10-16 19:39 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
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 [this message]
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=20131016193947.GI4553@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--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=mingo@kernel.org \
--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