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:   Tue, 13 Jul 2021 13:23:01 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Brendan Higgins <brendanhiggins@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Miguel Ojeda <ojeda@...nel.org>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        kunit-dev@...glegroups.com, linux-media@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, Thomas Graf <tgraf@...g.ch>,
        Andrew Morton <akpm@...ux-foundation.org>, jic23@...nel.org,
        linux@...musvillemoes.dk
Subject: Re: [PATCH v1 3/3] kernel.h: Split out container_of() and
 typeof_memeber() macros

On Tue, Jul 13, 2021 at 02:16:17PM +0300, Andy Shevchenko wrote:
> On Tue, Jul 13, 2021 at 12:37:46PM +0200, Greg Kroah-Hartman wrote:
> > On Tue, Jul 13, 2021 at 11:45:41AM +0300, Andy Shevchenko wrote:
> > > kernel.h is being used as a dump for all kinds of stuff for a long time.
> > > Here is the attempt cleaning it up by splitting out container_of() and
> > > typeof_memeber() macros.
> > 
> > That feels messy, why?
> 
> Because the headers in the kernel are messy.

Life is messy and can not easily be partitioned into tiny pieces.  That
way usually ends up being even messier in the end...

> > Reading one .h file for these common
> > macros/defines is fine, why are container_of and typeof somehow
> > deserving of their own .h files?
> 
> It's explained here. There are tons of drivers that includes kernel.h for only
> a few or even solely for container_of() macro.

And why is that really a problem?  kernel.h is in the cache and I would
be amazed if splitting this out actually made anything build faster.

> > What speedups are you seeing by
> > splitting this up?
> 
> C preprocessing.

Numbers please.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ