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:	Sun, 24 Jun 2012 18:49:38 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Alex Williamson <alex.williamson@...hat.com>
Cc:	Avi Kivity <avi@...hat.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, jan.kiszka@...mens.com
Subject: Re: [PATCH 3/4] kvm: Extend irqfd to support level interrupts

On Sun, Jun 24, 2012 at 09:18:38AM -0600, Alex Williamson wrote:
> > > @@ -242,7 +299,8 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
> > >  
> > >  	ret = 0;
> > >  	list_for_each_entry(tmp, &kvm->irqfds.items, list) {
> > > -		if (irqfd->eventfd != tmp->eventfd)
> > > +		if (irqfd->eventfd != tmp->eventfd &&
> > > +		    irqfd->eventfd != tmp->eoi_eventfd)
> > >  			continue;
> > 
> > So we allow duplicate irqfd with differing eoifd (or edge-triggered and
> > level-triggered irqfd on the same context).
> > 
> > (why the check in the first place? just so we can have a reliable
> > deassign or is it avoiding a deeper problem?)
> 
> I really wasn't sure to what extent we wanted to prevent duplicates.  My
> guess was that we don't want to have an irqfd trigger more than one
> thing.  That seems to be what the current code does.  I don't see any
> problems with multiple irqfds triggering the same eventfd though.  I
> only added a test that a new irqfd can't be triggered by an existing
> eoi_eventfd as that could make a nasty loop.

How would that make a loop? You can have the same thing
with e.g. ioeventfd - why isn't it a problem there?

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