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:	Wed, 21 Sep 2011 09:57:17 -0400
From:	Don Zickus <dzickus@...hat.com>
To:	Huang Ying <ying.huang@...el.com>
Cc:	"x86@...nel.org" <x86@...nel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Robert Richter <robert.richter@....com>,
	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
	"avi@...hat.com" <avi@...hat.com>,
	"jeremy@...p.org" <jeremy@...p.org>
Subject: Re: [V5][PATCH 4/6] x86, nmi:  add in logic to handle multiple
 events and unknown NMIs

On Wed, Sep 21, 2011 at 01:43:57PM +0800, Huang Ying wrote:
> On 09/20/2011 10:43 PM, Don Zickus wrote:
> [snip]
> > @@ -313,7 +359,31 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
> >  	}
> >  	raw_spin_unlock(&nmi_reason_lock);
> >  
> > -	unknown_nmi_error(reason, regs);
> > +	/*
> > +	 * Only one NMI can be latched at a time.  To handle
> > +	 * this we may process multiple nmi handlers at once to
> > +	 * cover the case where an NMI is dropped.  The downside
> > +	 * to this approach is we may process an NMI prematurely,
> > +	 * while its real NMI is sitting latched.  This will cause
> > +	 * an unknown NMI on the next run of the NMI processing.
> > +	 * 
> > +	 * We tried to flag that condition above, by setting the
> > +	 * swallow_nmi flag when we process more than one event.
> > +	 * This condition is also only present on the second half
> > +	 * of a back-to-back NMI, so we flag that condition too.
> > +	 *
> > +	 * If both are true, we assume we already processed this
> > +	 * NMI previously and we swallow it.  Otherwise we reset
> > +	 * the logic.
> > +	 *
> > +	 * I am sure there are scenarios where we accidentally
> > +	 * swallow a real 'unknown' NMI.  But this is the best
> > +	 * we can do for now.
> 
> Why not describe a scenario where we swallow a real 'unknown' NMI?  So
> that someone working on the code in the future will know the challenge?

I can add a couple of lines of comment for that.

Thanks,
Don
--
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