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: <20170627001534.GK21846@wotan.suse.de>
Date:   Tue, 27 Jun 2017 02:15:34 +0200
From:   "Luis R. Rodriguez" <mcgrof@...nel.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        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 Mon, Jun 26, 2017 at 04:43:10PM -0700, Linus Torvalds wrote:
> The swait interface is so special and so undocumented, that I really
> didn't expect anybody to even know about it unless they had very
> specific needs, much less use it.

If swait is really not designed and intended to be used for cases that do not
require all the bells and whistles of wait, and is just very special-case, a
nice big warning about it seems appropriate on swait.h, instead of the
welcoming open armed, "One would recommend using this wait queue where
possible".

>From d751201aebf7ca8acb765284a9017a711ddbe791 Mon Sep 17 00:00:00 2001
From: "Luis R. Rodriguez" <mcgrof@...nel.org>
Date: Mon, 26 Jun 2017 17:06:10 -0700
Subject: [PATCH] swait: annotate swait's special use

Before kernel hipsters start thinking swait is the cool thing to do.

Signed-off-by: Luis R. Rodriguez <mcgrof@...nel.org>
---
 include/linux/swait.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/swait.h b/include/linux/swait.h
index 4a4e180d0a35..14fcf23cece4 100644
--- a/include/linux/swait.h
+++ b/include/linux/swait.h
@@ -29,7 +29,10 @@
  *
  * As a side effect of this; the data structures are slimmer.
  *
- * One would recommend using this wait queue where possible.
+ * NOTE: swait is for cases of extreme memory considerations and some very
+ * special realtime issues, where it saves a couple of bytes in structures that
+ * need close packing. As such its very special-use. Consider using regular
+ * waits queues from wait.h instead *first*.
  */
 
 struct task_struct;
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ