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:	Thu, 05 Nov 2009 10:13:10 -0700
From:	Zan Lynx <zlynx@....org>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	linux-kernel@...r.kernel.org, mk@...all.com
Subject: Re: [PATCH] pipe: don't block after data has been written

On 11/5/09 9:37 AM, Eric Dumazet wrote:
> Max Kellermann a écrit :
>> On 2009/11/05 17:27, Eric Dumazet<eric.dumazet@...il.com>  wrote:
>>> Your patch breaks many programs, that dont use poll()/select()
>>>
>>> char result[1000000];
>>> main()
>>> {
>>> 	computethings();
>>> 	write(1, buffer, 1000000);
>>> }
>>
>> Your code does not check the return value of write().  This is a bug.
>>
>
> Welcome to real world.

Yes in the real world there are bugs. The decision is to choose which 
bug you are going to expose. If it was my decision I would make the code 
work as documented, as Max wants to do.

I remember many years ago needing to fix some inetd-called server code 
that got unexpected partial writes on blocking sockets. It was either 
Solaris or HP/UX. So this is nothing new.

In fact I think that Linux will already do short writes if a signal is 
received without restart set for the handler. I found several bugs last 
year in glibc and libstdc++ fwrite and iostreams regarding that.
-- 
Zan Lynx
zlynx@....org

"Knowledge is Power.  Power Corrupts.  Study Hard.  Be Evil."
--
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