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] [day] [month] [year] [list]
Message-ID: <35c90d960906151420l1805b5f6j78d4a8172874104e@mail.gmail.com>
Date:	Mon, 15 Jun 2009 14:20:43 -0700
From:	Nick Pelly <npelly@...gle.com>
To:	Iain Hibbert <plunky@...-online.net>
Cc:	linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
	davem@...emloft.net, Marcel Holtmann <marcel@...tmann.org>
Subject: Re: Expected behavior of shutdown() in multi-threaded socket 
	programming

On Fri, Jun 12, 2009 at 1:46 AM, Iain Hibbert<plunky@...-online.net> wrote:
> On Thu, 11 Jun 2009, Nick Pelly wrote:
>
>> Any comments on this one? I would like to correct the behavior of
>> shutdown() on AF_BLUETOOTH sockets, but I have been advised by Marcel
>> Holtmann that we need to agree on the correct behavior first.
>>
>> How should shutdown() behave when other threads are blocked on the same socket?
>
> IMHO consistency should apply.
>
> The opengroup specification for shutdown() says
>
>  "The shutdown() function shall cause all or part of a full-duplex
>  connection on the socket associated with the file descriptor socket to
>  be shut down."
>
> and while that does not really cover the case when the socket is blocked
> in accept(), if all the other socket types abort the block then that is
> what the PF_BLUETOOTH sockets should do too.
>
> The opengroup specification for accept() suggests EINVAL would be returned
> if the socket was not accepting connections and arguably that is the case
> after a shutdown(), though ECONNABORTED could be used too (your program
> displays ECONNABORTED on NetBSD for instance)
>
>> I also have similar results for other blocking syscalls such as
>> connect(), read(), write(), poll() etc, but the test program is not as
>> simple.
>
> They should all handle the shutdown().

Sounds good to me.

Thanks for the input.

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