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: <20180213013803.GI3617@linux.vnet.ibm.com>
Date:   Mon, 12 Feb 2018 17:38:03 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Akira Yokosawa <akiyks@...il.com>, linux-kernel@...r.kernel.org,
        stern@...land.harvard.edu, parri.andrea@...il.com,
        will.deacon@....com, peterz@...radead.org, boqun.feng@...il.com,
        npiggin@...il.com, dhowells@...hat.com, j.alglave@....ac.uk,
        luc.maranget@...ia.fr, Patrick Bellasi <patrick.bellasi@....com>
Subject: Re: [PATCH v2] tools/memory-model: Make compat with herd7 7.47 ("-"
 -> "_")

On Sun, Feb 11, 2018 at 12:51:48PM +0100, Ingo Molnar wrote:
> 
> * Paul E. McKenney <paulmck@...ux.vnet.ibm.com> wrote:
> 
> > On Sat, Feb 10, 2018 at 08:46:25AM +0900, Akira Yokosawa wrote:
> > > >From 7c1f497a9a51e8db1a94c8a7ef0b74b235aaab88 Mon Sep 17 00:00:00 2001
> > > From: Akira Yokosawa <akiyks@...il.com>
> > > Date: Fri, 9 Feb 2018 04:51:05 -0800
> > > Subject: [PATCH v2] tools/memory-model: Make compat with herd7 7.47 ("-" -> "_")
> > > 
> > > As of herd7 7.47, these '-'s are not permitted and end up in
> > > errors such as:
> > > 
> > >     File "./linux-kernel.def", line 44, characters 29-30:
> > >     unexpected '-' (in macros)
> > > 
> > > Partial revert of commit 2d5fba7782d6 ("linux-kernel*: Make RCU
> > > identifiers match ASPLOS paper") in the repository at
> > > https://github.com/aparri/memory-model can restore the compatibility
> > > with herd7 7.47.
> > > 
> > > Reported-by: Patrick Bellasi <patrick.bellasi@....com>
> > > Suggested-by: Andrea Parri <parri.andrea@...il.com>
> > > Signed-off-by: Akira Yokosawa <akiyks@...il.com>
> > > ---
> > > Paul,
> > > 
> > > FWIW, this is a squashed version relative to patch 07/10 in the RFC series.
> > 
> > Thank you, Akira!
> > 
> > I am going to hold off on this for a bit to see if we can instead get
> > a new release of herd7, but if we can't. this might well be a very good
> > way to go.
> 
> I'm wondering:
> 
> > >  // RCU
> > > -rcu_read_lock() { __fence{rcu-lock}; }
> > > -rcu_read_unlock() { __fence{rcu-unlock};}
> > > -synchronize_rcu() { __fence{sync-rcu}; }
> > > -synchronize_rcu_expedited() { __fence{sync-rcu}; }
> > > +rcu_read_lock() { __fence{rcu_lock}; }
> > > +rcu_read_unlock() { __fence{rcu_unlock};}
> > > +synchronize_rcu() { __fence{sync_rcu}; }
> > > +synchronize_rcu_expedited() { __fence{sync_rcu}; }
> 
> What's the point of using '-' instead of '_'? In a program language syntax 
> environment it's easy to confuse it with a '-' operator, and it also looks 
> slightly sloppy and inconsistent if we sometimes have '_' and sometimes '-'.
> 
> If it used on purpose, to separate namespaces from kernel internal API names,
> then that's rather obscure IMHO and then I'd rather suggest proper prefixes 
> instead.

These lines are connecting Linux-kernel names to cat-language names.
The cat language can be thought of as a set-based constraint language,
which doesn't have subtraction (the closest analog being set difference,
which is denoted by "\").  Cat-language code has used "-" as a word
separator in names, and the model had previously had an odd mixture of
"-" and "_".  Hence, the switch to the cat-language convention.

Of course, if underscore is strongly preferred, underscore does work,
and it should be possible to move in that direction.

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ