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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0902061216370.22636@gandalf.stny.rr.com>
Date:	Fri, 6 Feb 2009 12:22:10 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 2/4] nmi: add generic nmi tracking state


On Fri, 6 Feb 2009, Andrew Morton wrote:
> > 
> > That would be fun to implement. Not the in_nmi code, but the handling of 
> > nested NMIs. How would you be able to save the state when the NMI occurred 
> > without being preempted by another NMI?
> 
> Like with normal interrupts?

Normal interrupts can enable interrupts again, while in the handler, as 
well as disable them.

> 
> As long as the number of sources is finite, nested NMIs could work OK.

I guess you would need a mechanism to enable and disable NMIs.

> 
> > I think the arch that has nested NMIs will have many more issues to solve 
> > in the kernel than this one.
> 
> I have a vague memory that x86 can do this.
> 
> <googles a bit>
> 
> What's all this about?
> https://www.x86-64.org/pipermail/discuss/2005-October/007010.html

Yuck, masking Non Maskable Interrupts?

> http://kerneltrap.org/index.php?q=mailarchive/linux-kernel/2008/2/12/830704/thread

It looks like it calls nmi_exit, so the code would dec it.

> 
> I expect that even if it is possible, we can live without it.
> 
> And if I'm wrong, it'll be easy to accommodate by adding a new counter
> into the task_struct or thread_struct.

Yeah, the bug on would trigger as soon as we do that, and we could
easily update the code when that time comes.

> 
> Does your above implementation make in_interrupt() return true if
> in_nmi()?  I think it doesn't, but should?

The "in_nmi()" is set when we do nmi_enter, and nmi_enter also calls 
irq_enter which makes in_interrupt() true. I thought adding the in_nmi 
condition to in_interrupt would be redundant.

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