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:   Wed, 5 Jul 2017 09:33:38 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        DanielWagnerwagi@...om.org, Boqun Feng <boqun.feng@...il.com>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Ming Lei <ming.lei@...hat.com>,
        "Li, Yi" <yi1.li@...ux.intel.com>,
        "AKASHI, Takahiro" <takahiro.akashi@...aro.org>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Petr Mladek <pmladek@...e.com>,
        Andrew Lutomirski <luto@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        David Howells <dhowells@...hat.com>,
        Alan Cox <alan@...ux.intel.com>,
        "Theodore Ts'o" <tytso@....edu>, oss-drivers@...ronome.com
Subject: Re: [PATCH] firmware: wake all waiters

On Wed, Jul 5, 2017 at 9:18 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>
> So swait should be capable of most things people want from a waitqueue.

But what's the point?

Regular wait-queues work fine. The advantages of swait aren't huge
even if you fix the crap it does now.

And the disadvantages of "another interface to do the same thing" are
big indeed.

Keep it specialized.

> Right, so we need the raw_spinlock in order to run from non-preemptible
> code on RT. And we then also need bounded runtimes on stuff.
>
> The only function which is affected by that is swake_up_all(),

No.

The fact is, "swake_up()" needs to do that "wake up all" for this
interface to be even *REMOTELY* acceptable for general use.

Seriously. If  the regular "swake_up()" doesn't do what people expect
from a wakeup, then it damn well should not be used, and not be taught
to people. It's a very specialized interface for only two users, and
right now it looks like one of those two users shouldn't have used it
in the first place.

> In any case, I'm not seeing why you call it idiotic.

Have you read the problems?

There were originally three users:

 - one of them is firmware loading, and it was actively *buggy* due to
using hat shit interface, and it's going away

 - one of them is kvm, and for kvm that interface was shit.

 - the final one is RCU, and even there it is very questionable.

There is no question: swait() is a mistake and should not be used. And
you're apparently still in denial about how completely broken it is to
have "swake_up()" have different semantics from "swake_up_all()".

                  Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ