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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E8837D4.5040607@redhat.com>
Date:	Sun, 02 Oct 2011 12:07:16 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Don Zickus <dzickus@...hat.com>
CC:	Robert Richter <robert.richter@....com>,
	"x86@...nel.org" <x86@...nel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"ying.huang@...el.com" <ying.huang@...el.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
	"jeremy@...p.org" <jeremy@...p.org>
Subject: Re: [V6][PATCH 4/6] x86, nmi:  add in logic to handle multiple events
 and unknown NMIs

On 09/28/2011 03:37 PM, Don Zickus wrote:
> On Wed, Sep 28, 2011 at 12:31:40PM +0200, Robert Richter wrote:
> >  On 23.09.11 15:17:13, Don Zickus wrote:
> >  >  @@ -89,6 +89,15 @@ static int notrace __kprobes nmi_handle(unsigned int type, struct pt_regs *regs)
> >  >
> >  >   		handled += a->handler(type, regs);
> >  >
> >  >  +		/*
> >  >  + 		 * Optimization: only loop once if this is not a
> >  >  + 		 * back-to-back NMI.  The idea is nothing is dropped
> >  >  + 		 * on the first NMI, only on the second of a back-to-back
> >  >  + 		 * NMI.  No need to waste cycles going through all the
> >  >  + 		 * handlers.
> >  >  + 		 */
> >  >  +		if (!b2b&&  handled)
> >  >  +			break;
> >
> >  I don't think we can leave this in. As said, there are cases that 2
> >  nmis trigger but the handler is called only once. Only the first would
> >  be handled then, and the second get lost cause there is no 2nd nmi
> >  call.
>
> Right.  Avi, Jeremy what was your objection that needed this optimization
> in the first place?
>

First, iterating over all NMI sources is going to be slow, and a lot 
more so in a guest.  This reduces the performance of perf.

Second, I wanted to use NMIs as a way of waking up a vcpu sleeping with 
interrupts disabled (in the context of Jeremy's paravirt spinlock 
patches).  Looks like we'll have to use paravirtualization for that.

-- 
error compiling committee.c: too many arguments to function

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