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:	Fri, 1 Nov 2013 10:09:12 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Jason Baron <jbaron@...mai.com>, paulmck@...ux.vnet.ibm.com,
	normalperson@...t.net, nzimmer@....com, viro@...iv.linux.org.uk,
	nelhage@...hage.com, davidel@...ilserver.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] epoll: remove the on_list check for 'struct epitem'

Hi Andrew,

On Wed, 30 Oct 2013 18:32:41 +0000 (GMT) Jason Baron <jbaron@...mai.com> wrote:
>
> By removing the 'int on_list' field from 'struct epitem', we avoid hitting the
> BUILD_BUG_ON() for 'struct epitem' being larger than 128 bytes.
> 
> In file included from include/linux/init.h:4:0,
>                  from fs/eventpoll.c:14:
> fs/eventpoll.c: In function 'eventpoll_init':
> include/linux/compiler.h:321:20: error: call to '__compiletime_assert_2137' declared with attribute error: BUILD_BUG_ON failed: sizeof(void *) <= 8 && sizeof(struct epitem) > 128
>     prefix ## suffix();    \
> 
> The check to make sure that the 'struct epitem' was actually linked via
> epi->fllink was added to avoid having the list removal primitives called twice
> for the same 'struct epitem'. However, the double call possibility was removed
> by 'Subject: epoll: optimize EPOLL_CTL_DEL using rcu'. There, the call to
> 'list_del_init()' in eventpoll_release_file() was removed (we now rely on the
> list delete happening entirely in 'ep_remove()', which is called from
> eventpoll_release_file()).
> 
> There is also the question as to whether multiple ep_remove() calls could
> happen concurrently. This can not happen since EPOLL_CTL_DEL can't
> race with eventpoll_release_file() or ep_free() - it has to do an fget()
> to proceed. Further, eventpoll_release_file() can not race with ep_free(),
> since they both acquire the 'epmutex'.
> 
> Signed-off-by: Jason Baron <jbaron@...mai.com>

Do you want me to put this in my copy of the mmotm instead of reverting
these three?

epoll-do-not-take-global-epmutex-for-simple-topologies-fix
epoll: do not take global 'epmutex' for simple topologies
epoll: optimize EPOLL_CTL_DEL using rcu

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ