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] [day] [month] [year] [list]
Date:   Thu, 30 Apr 2020 11:23:34 +0800
From:   Yang Xu <xuyang2018.jy@...fujitsu.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Li Wang <liwang@...hat.com>
CC:     LTP List <ltp@...ts.linux.it>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        David Howells <dhowells@...hat.com>
Subject: Re: [LTP] [PATCH v4 3/3] syscalls/pipe2_03: Add new test for pipe2
 O_DIRECT flag

Hi Linus


> On Sun, Apr 26, 2020 at 4:59 AM Li Wang <liwang@...hat.com> wrote:
>>
>>  From kernel code seems you are right. The pipe indeed takes use of PAGE_SIZE(ppc64le: 64kB) to split the writes data in the packetized mode (marked by O_DIRECT). But in the manual page, O_DIRECT indicates us the PIPE_BUF is the correct atomic unit.
> 
> The manual is correct.
> 
> PIPE_BUF is the size we _guarantee_ can be used atomically.
> 
> The fact that in practice we do have bigger buffers on some platforms
> is an implementation detail.
> 
> Yes, that implementation detail can be visible, but basically any test
> code that tries to test for "what if we use a bigger bug that
> PIPE_BUF" is buggy. It's simply not guaranteed to work any more.
> 
> O_DIRECT is kind of immaterial, except it's just one of those things
> where the atomic size is slightly more visible. But basically,
> packetized pipes with bigger packets than PIPE_BUF is random behavior.
> It may work. It may not.
Thanks for your explanation. I am more curious about the user scene of 
this flag.

@Li, so how to design this test? In this test, we don't have complex 
scene to test this automic unit.

Best Regards
Yang Xu
> 
>                  Linus
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ