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]
Date:	Mon, 28 Nov 2011 20:53:55 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Paul Turner <pjt@...gle.com>
Subject: Re: Perhaps a side effect regarding NMI returns

On Mon, Nov 28, 2011 at 8:07 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> If enabling interrupts also enables NMIs, then there's no side effect.

The only thing that enables NMI's again is 'iret', afaik. Of course,
it can be *any* iret, so once you enable interrupts, you can get a
timer interrupt, and the timer interrupt returning with iret will
re-enable NMI's then too.

I would suggest that the actual NMI handler itself should probably
never use that paranoid exit at all, and just always use a regular
iret. Screw scheduling and TIF checks.

Probably only the exceptions that can happen *during* NMI (eg debug,
stack exception, double-fault etc) should use the paranoid versions
that try to avoid using iret.

Because I think you're right - we shouldn't call schedule() from
within the NMI handler, even if we do enable interrupts and switch to
the normal stack. Even if it probably does happen to work normally.

But I have to admit to not necessarily thinking it through a lot.

                            Linus
--
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