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: <1395847524.12610.208.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 26 Mar 2014 08:25:24 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Rainer Weikusat <rweikusat@...ileactivedefense.com>
Cc:	David Laight <David.Laight@...LAB.COM>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: unix: non blocking recvmsg() should not return
 -EINTR

On Wed, 2014-03-26 at 15:13 +0000, Rainer Weikusat wrote:

> (This is from memory) If there's a thread blocked in recv and another
> blocked on the lock and the kernel selects the thread blocked on the lock
> for handling the signal, the signal won't be handled until some data is
> received on the socket, ie, possibly never.

Look at what we do for AF_INET. We handle this the proper way.

If we are 'interrupted' by a signal while sleeping in lock_sock(),
recvmsg() on a non blocking socket, we return -EAGAIN properly, not
-EINTR.

Fact that we potentially sleep to get the socket lock is hidden for the
user, its an implementation detail of the kernel.

We never return -EINTR, as stated in manpage for non blocking sockets.

Only AF_UNIX in recent kernels introduced this API change.


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