lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131016091437.146cb9d4@gandalf.local.home>
Date:	Wed, 16 Oct 2013 09:14:37 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"x86@...nel.org" <x86@...nel.org>,
	"Wang, Xiaoming" <xiaoming.wang@...el.com>,
	"Li, Zhuangzhi" <zhuangzhi.li@...el.com>,
	"Liu, Chuansheng" <chuansheng.liu@...el.com>
Subject: Re: [PATCH] x86: Remove WARN_ON(in_nmi()) from vmalloc_fault

On Wed, 16 Oct 2013 15:08:57 +0200
Frederic Weisbecker <fweisbec@...il.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.

> 
> > 
> > > 
> > > So I hope we can think about something else for the long term.
> > 
> > I still don't understand what's wrong with it. As long as the faulting
> > code does not grab any locks there shouldn't be anything wrong with
> > faulting in NMI. For vmalloc, it is just updating page tables.
> 
> NMI code is written with the idea that it can't be interrupted. May be that
> paranoia (again), you know. And I can't point you any problem in practice.
> I just think that allowing such a thing is asking for troubles.

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?

> 
> But I'm ok with your patch, it fixes a real bug and as long as we don't have
> a better solution, we should keep that.
> 
> BTW, does faulting in NMIs re-enable NMIs?

Yes, but we now have code to handle that :-)

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ