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:   Mon, 22 Jun 2020 09:22:51 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Linux-kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>
Subject: Re: [RFC PATCH 1/2] Explicitly include linux/major.h where it is needed

On Mon, Jun 22, 2020 at 6:25 AM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> On Wed, 17 Jun 2020 16:18:10 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> > On Wed, 17 Jun 2020 07:58:43 +0200 Greg KH <gregkh@...uxfoundation.org> wrote:
> > > On Wed, Jun 17, 2020 at 09:27:47AM +1000, Stephen Rothwell wrote:
> > > > This is in preparation for removing the include of major.h where it is
> > > > not needed.
> > > >
> > > > These files were found using
> > > >
> > > >   grep -E -L '[<"](uapi/)?linux/major\.h' $(git grep -l -w -f /tmp/xx)
> > > >
> > > > where /tmp/xx contains all the symbols defined in major.h.  There were
> > > > a couple of files in that list that did not need the include since the
> > > > references are in comments.
> > > >
> > > > Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> > >
> > > Any reason this had an RFC, but patch 2/2 did not?
> >
> > I forgot :-)  I added RFC just to hopefully get some attention as this
> > is just the start of a long slow use of my "spare" time.
> >
> > > They look good to me, I will be glad to take these, but do you still
> > > want reviews from others for this?  It seems simple enough to me...
> >
> > Yeah, well, we all know the simplest patches usually cause the most pain :-)
> >
> > However, I have been fairly careful and it is an easy include file to
> > work with.  And I have done my usual build checks, so the linux-next
> > maintainer won't complain about build problems :-)
> >
> > I would like to hear from Arnd, at least, as I don't want to step on
> > his toes (he is having a larger look at our include files).
>
> Any comment?

I now have a set of regex/header file pairs and a script that automatically
adds the #include statements to any source file that needs them as a
preparation for a larger-scale cleanup. Your change is going in the
same direction, and linux/major.h is a header that was not on my list
yet, so I'm completely happy with this.

One thing that I did differently in my script is to insert the new #include
statement in a way that retains alphabetical ordering of the other inclusions
rather than adding it at the end.

If the headers were not sorted before, it just tries a trivial nearest match,
adding it somewhat randomly, but it would still avoid some clashes with
patches that add different headers at the end or that add the same header
using the same method.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ