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: <20180705115213.suo6ocnels5oymbg@lakrids.cambridge.arm.com>
Date:   Thu, 5 Jul 2018 12:52:14 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Will Deacon <will.deacon@....com>
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        boqun.feng@...il.com
Subject: Re: [PATCHv2 08/11] atomics: switch to generated fallbacks

On Wed, Jul 04, 2018 at 06:44:52PM +0100, Will Deacon wrote:
> On Wed, Jul 04, 2018 at 05:01:46PM +0100, Mark Rutland wrote:
> > On Wed, Jul 04, 2018 at 04:28:47PM +0100, Will Deacon wrote:
> > > On Mon, Jun 25, 2018 at 11:59:49AM +0100, Mark Rutland wrote:
> > > > As a step to ensuring the atomic* APIs are consistent, switch to fallbacks
> > > > generated by gen-atomic-fallback.sh.
> > > > 
> > > > These are checked in rather than generated with Kbuild, since:
> > > > 
> > > > * This allows inspection of the atomics with git grep and ctags on a
> > > >   pristine tree, which Linus strongly prefers being able to do.
> > > > 
> > > > * The fallbacks are not expected to change very often, and are not
> > > >   affected by machine details or configuration options, so regenerating
> > > >   them for *every* build is somewhat wasteful.
> > > > 
> > > > * These are included by files required *very* early in the build process
> > > >   (e.g. for generating bounds.h), and we'd rather not complicate the
> > > >   top-level Kbuild file.
> > > 
> > > Would it be worth checking that the generated output from the script doesn't
> > > differ from the file in tree at some point during the build, and issuing a
> > > warning if they do?
> > 
> > We could do that in the top-level Kbuild file. It would be less hideous
> > than the generation was, since we don't have to add dependencies to all
> > other targets.
> > 
> > I can take a look, if you'd like?
> 
> Yes, please.

This came out simple enough [1]; I'll send a v3 with that.

> Might also be worth having your "THIS FILE IS GENERATED" disclaimer
> before each function, as I completely missed it when I opened the file
> since it just looks like part of the license and jumping around with
> ctags might dump you halfway down the file.

I'd prefer not do litter the files with such a repeated comment. It's
messy and painful to do consistently, and given the Kbuild check, I
don't think that it should be necessary.

Thanks,
Mark.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?h=atomics/generated&id=29a4a61360ee1baf812a1a4e93ceebcaee426a70

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ