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: <1447851240.22599.147.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 18 Nov 2015 04:54:00 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc:	Lorenzo Colitti <lorenzo@...gle.com>,
	Stephen Hemminger <stephen@...workplumber.org>,
	netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
	Erik Kline <ek@...gle.com>,
	Maciej Żenczykowski <maze@...gle.com>,
	Dmitry Torokhov <dtor@...gle.com>
Subject: Re: Add a SOCK_DESTROY operation to close sockets from userspace

On Wed, 2015-11-18 at 12:19 +0100, Hannes Frederic Sowa wrote:
> On Wed, Nov 18, 2015, at 11:47, Lorenzo Colitti wrote:
> > On Wed, Nov 18, 2015 at 7:19 PM, Hannes Frederic Sowa
> > <hannes@...essinduktion.org> wrote:
> > > I bet there will soon be a timewaitd which handles the not configurable
> > > (David has rejected all those patches so far) timeout of TIME_WAIT
> > > sockets. And I bet it will be used. :/
> > 
> > No, SOCK_DESTROY has no effect on TCP_TIME_WAIT sockets or any other
> > non-full socket.
> > 
> > When called on any socket where sk_fullsock(sk) is false, it returns
> > EOPNOTSUPP because there is nothing to do. Its purpose is to interrupt
> > blocked userspace socket calls, not to release resources.
> 
> Okay, thanks for clarification! Still I don't see how you enter
> TIME_WAIT in case you kill an active socket. At least my start-up idea
> timewaitd seems to be not implementable. ;)
> 
> I was wondering why you didn't use tcp_close function, because still we
> could have the address and we would like to do a proper shutdown of the
> connection. While this patchset wants to tear down sockets for addresses
> no longer alive, it still can be used with full sockets.

I guess this could work, but we would have to also propose a mechanism
where no FIN/RST message is sent.

This might be the time for upstreaming our TCP_SILENT_CLOSE
implementation.

/* on close(): free sock, no FIN/RST */

It seems there is a lot of confusion on this thread about these patches.

Proposal is _not_ changing TCP stack behavior, as David Laight seems to
fear.



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