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:	Sat, 22 Sep 2007 20:14:15 +0400
From:	Evgeniy Polyakov <johnpol@....mipt.ru>
To:	Ulrich Drepper <drepper@...hat.com>
Cc:	netdev <netdev@...r.kernel.org>, Alan Cox <alan@...hat.com>
Subject: Re: bind and O_NONBLOCK

Hi Ulrich.

On Thu, Sep 20, 2007 at 10:59:53PM -0700, Ulrich Drepper (drepper@...hat.com) wrote:
> Some time back Alan asked about adding O_NONBLOCK support to bind in the
> POSIX spec.  I brought this up and the following text will be in the
> next revision of the POSIX spec:
> 
> =======================
> If the socket address cannot be assigned immediately and O_NONBLOCK is
> set for the file descriptor for the socket, bind( ) shall fail and set
> errno to [EINPROGRESS], but the assignment request shall not be aborted,
> and the assignment shall be completed asynchronously. Subsequent calls
> to bind() for the same socket, before the assignment is completed, shall
> fail and set errno to [EALREADY].
> 
> When the assignment has been performed asynchronously, pselect(),
> select(), and poll() shall indicate that the file descriptor for the
> socket is ready for reading and writing.
> =======================
> 
> It would be ideal if we'd have such an implementation in the next few
> months so that we, in theory, can check whether the text in the
> specification makes sense.

On behalf of which process this is supposed to be done?
Network does not have any async processing units to perform this kind 
of operations. There are four ways where bind can fail:

1. unsufficient rights - nothing can help here
2. there is no memory - async binding can not help here too, since it
	some memory just has to be allocated to save async request
	somewhere.
3. socket is locked.
4. addres is being bound is in use.

We can wait until it is released and perform binding on behalf of some 
other process in both situations, although I think we do not want 4'th
variant in some cases.

So, did I understand you correctly, that you want to introduce network
AIO here? (for example on behalf of work queue or something else?)

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