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:   Thu, 23 Apr 2020 11:33:57 +0200
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     Joe Perches <joe@...ches.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v4 4/7] kernel.h: Split out min()/max() et al helpers

On 22/04/2020 16.52, Joe Perches wrote:
> On Wed, 2020-04-22 at 15:51 +0300, Andy Shevchenko wrote:

>> 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.
> 
> Yeah, that's the difficult bit and it could make
> using precompiled headers very cumbersome.

You mentioned precompiled headers last time as well, but you haven't
demonstrated that using those is either feasible or advantageous - and
if at some distant future time it turns out that they are a good idea,
it's not really any more difficult at that time to do a
linux/kitchen_sink.h that includes whatever common set of headers seems
to provide a reasonable speedup.

Meanwhile, the sheer size of the headers that gets pulled into each and
every TU currently slows down the build:

https://wildmoose.dk/header-bloat/

so anything that reduces the size of common headers like kernel.h will
improve build times (the slowdown is "death by a thousand cuts", hence
so will any individual improvement be hard or impossible to measure by
itself - that doesn't mean it's not worth doing them). Of course, the
include of minmax.h (et al) from kernel.h must be removed, but that's
the kind of thing that can easily take a couple of cycles to get done,
unlike the damage that adding #include <linux/foo.h> to bar.h
immediately causes.

> I'd rather make #include <linux/kernel.h>" _more_
> common or even used as the mandatory first #include
> for all kernel .c files.

No. Please no.

> That would also ensure that common kernel facilities
> are not duplicated or have naming conflicts with other
> files.

What? People duplicate functionality because they're not aware it
already exists, forcing an #include of a declaration of some function
doesn't make any developer know about it.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ