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>] [day] [month] [year] [list]
Message-ID: <20060913132934.GA637@janus>
Date:	Wed, 13 Sep 2006 15:29:34 +0200
From:	Frank van Maarseveen <frankvm@...nkvm.com>
To:	linux-kernel@...r.kernel.org
Subject: select() and poll() inconsistency in writability test

A pipe without readers will yield EPIPE/SIGPIPE when trying to write()
into. A broken or shutdown TCP connection will behave the same modulo
networking errors (which are returned only once as it seems).

A pipe without readers will set POLLERR in pipe_poll() and this turns
up as being writable according to select() so it won't wait. However, a
TCP connection no longer open [for writing] does not set POLLERR/POLLOUT
in tcp_poll(): so it is not yet writable according to select() causing it
to wait. This is not consistent behavior.

Shouldn't the kernel set POLLOUT in both "EPIPE" cases instead of
POLLERR/nothing as it does now?

-- 
Frank
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ