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, 8 Nov 2006 14:44:52 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Andrew Morton <akpm@...l.org>
cc:	Eric Dumazet <dada1@...mosbay.com>,
	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.

On Wed, 8 Nov 2006, Andrew Morton wrote:

> On Wed, 8 Nov 2006 15:51:13 +0100
> Eric Dumazet <dada1@...mosbay.com> wrote:
> 
> > [PATCH] eventpoll : In case a fault occurs during copy_to_user(), we should 
> > report the count of events that were successfully copied into user space, 
> > instead of EFAULT. That would be consistent with behavior of read/write() 
> > syscalls for example.
> > 
> > Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
> > 
> > 
> > 
> > [eventpoll.patch  text/plain (424B)]
> > --- linux/fs/eventpoll.c	2006-11-08 15:37:36.000000000 +0100
> > +++ linux/fs/eventpoll.c	2006-11-08 15:38:31.000000000 +0100
> > @@ -1447,7 +1447,7 @@
> >  				       &events[eventcnt].events) ||
> >  			    __put_user(epi->event.data,
> >  				       &events[eventcnt].data))
> > -				return -EFAULT;
> > +				return eventcnt ? eventcnt : -EFAULT;
> >  			if (epi->event.events & EPOLLONESHOT)
> >  				epi->event.events &= EP_PRIVATE_BITS;
> >  			eventcnt++;
> > 
> 
> Definitely a better interface, but I wonder if it's too late to change it.
> 
> An app which does
> 
> 	if (epoll_wait(...) == -1)
> 		barf(errno);
> 	else
> 		assume_all_events_were_received();
> 
> will now do the wrong thing.
> 
> otoh, such an applciation basically _has_ to use the epoll_wait()
> return value to work out how many events it received, so maybe it's OK...

I don't care about both ways, but sys_poll() does the same thing epoll 
does right now, so I would not change epoll behaviour.



- 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