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]
Message-ID: <alpine.DEB.1.10.0904240911280.13272@makko.or.mcafeemobile.com>
Date:	Fri, 24 Apr 2009 09:13:23 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Gregory Haskins <ghaskins@...ell.com>
cc:	kvm@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	avi@...hat.com
Subject: Re: [KVM PATCH 2/3] eventfd: add a notifier mechanism

On Fri, 24 Apr 2009, Gregory Haskins wrote:

> Davide Libenzi wrote:
> > On Thu, 23 Apr 2009, Gregory Haskins wrote:
> >
> >   
> >>> Take a look at init_waitqueue_func_entry(), in particula at that "func" 
> >>> parameter. Then look at how __wake_up_common() does its thing.
> >>> You don't need to be "waiting" for our wakeup system to work. Callbacks 
> >>> works just fine, otherwise things like epoll could not work at all.
> >>>   
> >>>       
> >> Yeah, I was looking at that this afternoon after you mentioned it.  That
> >> makes sense.
> >>
> >> As of right now the wqh is embedded in the eventfd, accessible only by
> >> the .read() vtable entry.  In order to do this as you suggest, I imagine
> >> I need to slightly modify the eventfd interface to allow waiters other
> >> than the embedded readers to join the wait-queue.  How would you like to
> >> see that interface look?
> >>     
> >
> > Actually, you need no changes in eventfd, since you can use its poll() 
> > directly, by dropping a callback entry.
> > Take a look at how epoll does it in ep_insert()...
> >   
> Ah!  I just tried your suggestion and it was simple and it works.  That
> is brilliant.
> 
> I will post a follow-up v2 that drops patch 2/3.  Thanks, Davide.

I assume you're in control of the file/fd lifetime, so that the file* 
cannot vanish while you've your wait_queue dropped inside its 
wait_queue_head, isn't it?


- Davide


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