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, 21 Oct 2015 22:28:28 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Casper.Dik@...cle.com, David Miller <davem@...emloft.net>,
	Alan.Burlison@...cle.com, stephen@...workplumber.org,
	netdev@...r.kernel.org, dholland-tech@...bsd.org
Subject: Re: [Bug 106241] New: shutdown(3)/close(3) behaviour is incorrect
 for sockets in accept(3)

On Wed, Oct 21, 2015 at 02:18:30PM -0700, Eric Dumazet wrote:
> On Wed, 2015-10-21 at 18:04 +0200, Casper.Dik@...cle.com wrote:
> 
> > It is only expensive within the process itself. 
> 
> thread synchro would require additional barriers to maintain this state,
> for a very unlikely case.
> 
> The atomic_{inc|dec}() on file refcount are already a problem.

To be fair, this would avoid at least _that_ - file refcount updates would
be less frequent.  However, unlike file->f_count, *descriptor* refcounts
would be much harder to keep in different cachelines.

> We certainly do not use/take a lock to find a file pointer into file
> descriptor table.
> 
> (This lock is only used at open() or close() time)

as well as dup2() and friends, of course.  But yes, we are pretty careful
about avoiding non-local stores on the normal "get file by descriptor" path -
in case of non-shared descriptor table we don't do them at all, and in case
of shared one we only modify refcount in struct file.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ