On Wed, 16 Oct 2013 15:28:15 +0200 Frederic Weisbecker <fweis...@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 <fweis...@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. > > 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! -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/