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:   Wed, 5 Feb 2020 13:17:21 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Joe Perches <joe@...ches.com>
Cc:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, Trond@...ck.fi.intel.com,
        Myklebust@...ck.fi.intel.com, trond.myklebust@...merspace.com,
        Anna Schumaker <anna.schumaker@...app.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2 1/2] kernel.h: Split out min()/max() et al helpers

On Tue, Feb 04, 2020 at 05:17:36PM -0800, Joe Perches wrote:
> On Wed, 2020-02-05 at 00:23 +0100, Rasmus Villemoes wrote:
> > On 04/02/2020 18.04, Andy Shevchenko wrote:
> > > kernel.h is being used as a dump for all kinds of stuff for a long time.
> > > Here is the attempt to start cleaning it up by splitting out min()/max()
> > > et al helpers.
> > > 
> > > At the same time convert users in header and lib folder to use new header.
> > > Though for time being include new header back to kernel.h to avoid twisted
> > > indirected includes for existing users.
> > 
> > This is definitely long overdue, so thanks for taking this on. I think
> > minmax.h is fine as a header on its own, but for the other one, I think
> > you should go even further - and perhaps all these should go in a
> > include/math/ dir (include/linux/ has ~1200 files), so we'd have
> > math/minmax.h, math/round.h, math/ilog2.h, math/gcd.h etc., each
> > containing just enough #includes to be self-contained (so if there's a
> > declaration of something taking a u32, there's no way around having it
> > include types.h (or wherever that's defined).
> 
> I think that's not at all desirable.

device.h has been recently split to a 4 files (by Linus [old] request).
Any comments on that?

> kernel.h as a monolithic include block is pretty useful.
> 
> Separating out the various bits into separate files is
> OK, but kernel.h should #include them all.

That's fine but should not make people think this is a good idea to include
only one header to their modules.

> One day a precompiled header of just kernel.h would be
> useful to reduce overall compilation time.

All years no change.

> Converting
> all the other source files that use a small part of the
> existing kernel.h into multiple includes would not allow
> precompiled headers to work efficiently.


-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ