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:	Sat, 6 Feb 2016 09:22:14 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Davidlohr Bueso <dave@...olabs.net>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Mel Gorman <mgorman@...hsingularity.net>,
	Peter Zijlstra <peterz@...radead.org>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Chris Mason <clm@...com>, Darren Hart <dvhart@...ux.intel.com>,
	Hugh Dickins <hughd@...gle.com>, linux-kernel@...r.kernel.org,
	Davidlohr Bueso <dbueso@...e.de>, Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH v5] futex: Remove requirement for lock_page in
 get_futex_key


* Davidlohr Bueso <dave@...olabs.net> wrote:

> On Fri, 05 Feb 2016, Ingo Molnar wrote:
> 
> >So I too didn't understand that sentence at first, because the capitalization
> >really throws off quick parsing of that comment, as 'MB' ususally denotes
> >megabytes.
> 
> Sure, fair enough.
> 
> >
> >So please change it to "mb(); (A)" or so - and I think all of these comments
> >should be changed to use a standard API name for the barrier they imply, as the
> >head of futex.c does:
> >
> >*   waiters++; (a)
> >*   mb(); (A) <-- paired with -.
> >*                              |
> >*   lock(hash_bucket(futex));  |
> >*                              |
> >*   uval = *futex;             |
> >*                              |        *futex = newval;
> >*                              |        sys_futex(WAKE, futex);
> >*                              |          futex_wake(futex);
> >*                              |
> >*                              `------->  mb(); (B)
> >
> >Btw., pedantic: shouldn't that be smp_mb()? Futexes don't operate on IO spaces, so
> >on UP they only need compiler barriers.
> 
> Right, but we do in fact use smp barriers in this cases in the real code, that 
> mb() is just in the comments, I guess it would be desirable to change it to 
> smp_mb nonetheless.
> 
> However, could these changes be in a followup? Mainly because the barrier B 
> references will be updated across all futex.c... unless there are still concerns 
> about this particular patch, of course.

How about doing it first in a preparatory patch? So that reviews of patches 
actually making substantial changes don't get derailed by hard to read comments 
and so.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ