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: <20090702102138.GF6372@cr0.nay.redhat.com>
Date:	Thu, 2 Jul 2009 18:21:38 +0800
From:	Amerigo Wang <xiyou.wangcong@...il.com>
To:	Changli Gao <xiaosuo@...il.com>
Cc:	Amerigo Wang <xiyou.wangcong@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: PROPOSAL: extend pipe() to support NULL argument.

On Thu, Jul 02, 2009 at 06:04:02PM +0800, Changli Gao wrote:
>On Thu, Jul 2, 2009 at 5:46 PM, Amerigo Wang<xiyou.wangcong@...il.com> wrote:
>>>Are you familiar with splice() and tee()? They both use pipes as kernel buffers.
>>
>> You are not answering the question, obviously.
>When you use pipes as kernel buffer handlers, two fd isn't necessary.
>Using one will save half of fd resources. Is it obviously?

Not really.. I can't see any reason why you use this method to save
fd's... pick read(2)/write(2).

>
>>
>> And you snipped too much, how can you return that fd? Using the return value?
>one RW file descriptor is returned. I have answered this in the first post.

No, you never say *how* it is returned.

>
>> Ah! This will probably break the user-space program...
>>
>I don't think so. As a skillful programmer, who will trasfter pipe() a
>NULL pointer? In any way, it is break sth, but not very seriously, and
>won't affact any right and robust program.

Huh? Isn't the code sample below too common?

if (pipe(...))
   perror("pipe");

Currently pipe(2) can make sure this is robust.

You are trying to break it...
--
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