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:   Sat, 04 Feb 2017 10:32:48 -0800
From:   Joe Perches <joe@...ches.com>
To:     Julia Lawall <julia.lawall@...6.fr>
Cc:     Guenter Roeck <linux@...ck-us.net>,
        Derek Robson <robsonde@...il.com>, w.d.hubbs@...il.com,
        chris@...-brannons.com, kirk@...sers.ca,
        samuel.thibault@...-lyon.org, gregkh@...uxfoundation.org,
        shraddha.6596@...il.com, alan@...ux.intel.com, shiva@...ev.nl,
        amitoj1606@...il.com, amsfield22@...il.com, bhumirks@...il.com,
        waltfeasel@...il.com, speakup@...ux-speakup.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: Staging: speakup - syle fix permissions to octal

On Sat, 2017-02-04 at 19:10 +0100, Julia Lawall wrote:
> 
> On Fri, 3 Feb 2017, Joe Perches wrote:
> 
> > (adding Julia Lawall)
> > 
> > On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> > > On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > > > A style fix across whole driver.
> > > > changed permissions to octal style, found using checkpatch
> > > > 
> > > > Signed-off-by: Derek Robson <robsonde@...il.com>
> > > 
> > > FWIW, I think changes like this are best done using coccinelle.
> > 
> > I think checkpatch does it reasonably well.
> > 
> > Julia?  Can coccinelle do this?
> > 
> > I believe cocinelle doesn't handle the substitution
> > and octal addition very well when multiple flags
> > are used.
> 
> OK, finally received.  I think that Guenter's solution is a good one,
> because the rule-writer knows better than Coccinelle what people find to
> be intelligible.

If it's written in python, I don't see how that's
particularly different than being written in perl,
but coccinelle could certainly handle expressions
on multiple lines of these or'd constants better.

Are there any than span 2 or more lines?
I didn't see one with a casual grep.

Does coccinelle handle arbitrary ordering of these
constants in a form like Guenter suggests or does
each possible ordered sequence need to be written?

just fyi:

"S_IRWXU" => 0700
"S_IRUSR" => 0400
"S_IWUSR" => 0200
"S_IXUSR" => 0100
"S_IRWXG" => 0070
"S_IRGRP" => 0040
"S_IWGRP" => 0020
"S_IXGRP" => 0010
"S_IRWXO" => 0007
"S_IROTH" => 0004
"S_IWOTH" => 0002
"S_IXOTH" => 0001
"S_IRWXUGO" => 0777
"S_IRUGO" => 0444
"S_IWUGO" => 0222
"S_IXUGO" => 0111

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ