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:   Fri, 3 Feb 2023 10:24:58 +0800
From:   Hongchen Zhang <zhanghongchen@...ngson.cn>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Christian Brauner (Microsoft)" <brauner@...nel.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        David Howells <dhowells@...hat.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        maobibo <maobibo@...ngson.cn>,
        Matthew Wilcox <willy@...radead.org>,
        Sedat Dilek <sedat.dilek@...il.com>
Subject: Re: Re: [PATCH v4] pipe: use __pipe_{lock,unlock} instead of spinlock

Hi Linus,

On 2023/1/29 下午3:33, Linus Torvalds wrote:
> On Sat, Jan 28, 2023 at 10:05 PM Hongchen Zhang
> <zhanghongchen@...ngson.cn> wrote:
>>
>> Use spinlock in pipe_{read,write} cost too much time,IMO
>> pipe->{head,tail} can be protected by __pipe_{lock,unlock}.
>> On the other hand, we can use __pipe_{lock,unlock} to protect
>> the pipe->{head,tail} in pipe_resize_ring and
>> post_one_notification.
> 
> No, we really can't.
> 
> post_one_notification() is called under the RCU lock held, *and* with
> a spinlock held.
> 
> It simply cannot do a sleeping lock like __pipe_lock().
> 
> So that patch is simply fundamentally buggy, I'm afraid.
> 
>                  Linus
> 
Thanks for your review,Let me find out if there is any way to solve the
problem you said.

Best Regards
Hongchen Zhang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ