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: <CAK8P3a0qT9tAxFkLN_vJYRcocDW2TcBq79WcYKZFyAG0udZx5Q@mail.gmail.com>
Date:   Fri, 19 Nov 2021 15:47:35 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Alejandro Colomar <alx.manpages@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ajit Khaparde <ajit.khaparde@...adcom.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Arnd Bergmann <arnd@...db.de>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Borislav Petkov <bp@...e.de>,
        Corey Minyard <cminyard@...sta.com>, Chris Mason <clm@...com>,
        Christian Brauner <christian.brauner@...ntu.com>,
        David Sterba <dsterba@...e.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Jason Wang <jasowang@...hat.com>,
        Jitendra Bhivare <jitendra.bhivare@...adcom.com>,
        John Hubbard <jhubbard@...dia.com>,
        "John S . Gruber" <JohnSGruber@...il.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Josef Bacik <josef@...icpanda.com>,
        Kees Cook <keescook@...omium.org>,
        Ketan Mukadam <ketan.mukadam@...adcom.com>,
        Len Brown <lenb@...nel.org>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Miguel Ojeda <ojeda@...nel.org>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Russell King <linux@...linux.org.uk>,
        Somnath Kotur <somnath.kotur@...adcom.com>,
        Sriharsha Basavapatna <sriharsha.basavapatna@...adcom.com>,
        Subbu Seetharaman <subbu.seetharaman@...adcom.com>,
        intel-gfx@...ts.freedesktop.org, linux-acpi@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-btrfs@...r.kernel.org,
        linux-scsi@...r.kernel.org, netdev@...r.kernel.org,
        virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH 00/17] Add memberof(), split some headers, and slightly
 simplify code

On Fri, Nov 19, 2021 at 12:36 PM Alejandro Colomar
<alx.manpages@...il.com> wrote:
>
> Alejandro Colomar (17):
>   linux/container_of.h: Add memberof(T, m)
>   Use memberof(T, m) instead of explicit NULL dereference
>   Replace some uses of memberof() by its wrappers
>   linux/memberof.h: Move memberof() to separate header
>   linux/typeof_member.h: Move typeof_member() to a separate header
>   Simplify sizeof(typeof_member()) to sizeof_field()
>   linux/NULL.h: Move NULL to a separate header
>   linux/offsetof.h: Move offsetof(T, m) to a separate header
>   linux/offsetof.h: Implement offsetof() in terms of memberof()
>   linux/container_of.h: Implement container_of_safe() in terms of
>     container_of()
>   linux/container_of.h: Cosmetic
>   linux/container_of.h: Remove unnecessary cast to (void *)

My feeling is that this takes the separation too far: by having this many header
files that end up being included from practically every single .c file
in the kernel,
I think you end up making compile speed worse overall.

If your goal is to avoid having to recompile as much of the kernel
after touching
a header, I think a better approach is to help untangle the dependencies, e.g.
by splitting out type definitions from headers with inline functions (most
indirect header dependencies are on type definitions) and by focusing on
linux/fs.h, linux/sched.h, linux/mm.h and how they interact with the rest of the
headers. At the moment, these are included in most .c files and they in turn
include a ton of other headers.

          Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ