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]
Date:	Thu, 09 Nov 2006 08:52:45 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Eric Dumazet <dada1@...mosbay.com>
Cc:	Davide Libenzi <davidel@...ilserver.org>,
	Andrew Morton <akpm@...l.org>,
	Evgeniy Polyakov <johnpol@....mipt.ru>,
	David Miller <davem@...emloft.net>,
	Ulrich Drepper <drepper@...hat.com>,
	netdev <netdev@...r.kernel.org>,
	Zach Brown <zach.brown@...cle.com>,
	Christoph Hellwig <hch@...radead.org>,
	Chase Venters <chase.venters@...entec.com>,
	Johann Borck <johann.borck@...sedata.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jeff Garzik <jeff@...zik.org>
Subject: Re: [take23 0/5] kevent: Generic event handling mechanism.

Eric Dumazet a écrit :
> Davide Libenzi a écrit :
>> Lost forever means? If there are more processes watching some fd 
>> (external events), they all get their own copy of the events in their 
>> own private epoll fd. It's not that we "steal" things out of the 
>> kernel, is not a 1:1 producer/consumer thing (one producer, 1 queue). 
>> It's one producer, broadcast to all listeners (consumers) thing. The 
>> only case where it'd matter is in the case of multiple threads sharing 
>> the same epoll fd.
> 
> In my particular epoll application, the producer is tcp stack, and I 
> have one consumer. If an network event is lost in the EFAULT handling, 
> its lost forever. In any case, my application do provide a correct user 
> area, so this problem is only theorical.

I realize I was not explicit, and dit not answer your question (Lost forever 
means ?)

                 if (epi->revents) {
                         if (__put_user(epi->revents,
                                        &events[eventcnt].events) ||
                             __put_user(epi->event.data,
                                        &events[eventcnt].data))
                                 return -EFAULT;
 >>                        if (epi->event.events & EPOLLONESHOT)
 >>                                epi->event.events &= EP_PRIVATE_BITS;
                         eventcnt++;
                 }

If one EPOLLONESHOT event is correctly copied to user space, its status is 
updated.

If other ready events in the same epoll_wait() call cannot be transferred 
because of an EFAULT (we reach the real end of user provided area), this 
EPOLLONESHOT event is lost forever, because it wont be requeued in ready list.

Eric

-
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