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: <5ab59d72-00c7-435c-a47d-25333aabd1e3@app.fastmail.com>
Date: Fri, 09 Jan 2026 19:50:35 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Petr Tesarik" <ptesarik@...e.com>, "Yury Norov" <ynorov@...dia.com>
Cc: "Yury Norov" <yury.norov@...il.com>,
 "Rasmus Villemoes" <linux@...musvillemoes.dk>,
 "Richard Henderson" <richard.henderson@...aro.org>,
 "Matt Turner" <mattst88@...il.com>,
 "Magnus Lindholm" <linmag7@...il.com>,
 "Vineet Gupta" <vgupta@...nel.org>,
 "Geert Uytterhoeven" <geert@...ux-m68k.org>,
 "Maciej W. Rozycki" <macro@...am.me.uk>,
 "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
 "Madhavan Srinivasan" <maddy@...ux.ibm.com>,
 "Michael Ellerman" <mpe@...erman.id.au>,
 "Heiko Carstens" <hca@...ux.ibm.com>,
 "Vasily Gorbik" <gor@...ux.ibm.com>,
 "Alexander Gordeev" <agordeev@...ux.ibm.com>,
 "Chris Zankel" <chris@...kel.net>, "Max Filippov" <jcmvbkbc@...il.com>,
 "Patrik Jakobsson" <patrik.r.jakobsson@...il.com>,
 "Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>,
 "Maxime Ripard" <mripard@...nel.org>,
 "Thomas Zimmermann" <tzimmermann@...e.de>,
 "Dave Airlie" <airlied@...il.com>, "Simona Vetter" <simona@...ll.ch>,
 "Robin Murphy" <robin.murphy@....com>, "Joerg Roedel" <joro@...tes.org>,
 "Will Deacon" <will@...nel.org>, "Jakub Kicinski" <kuba@...nel.org>,
 "Andrew Lunn" <andrew+netdev@...n.ch>,
 "David S . Miller" <davem@...emloft.net>,
 "Eric Dumazet" <edumazet@...gle.com>, "Paolo Abeni" <pabeni@...hat.com>,
 "Oliver Neukum" <oliver@...kum.org>,
 "Kuan-Wei Chiu" <visitorckw@...il.com>,
 "Andrew Morton" <akpm@...ux-foundation.org>,
 "Marcel Holtmann" <marcel@...tmann.org>,
 "Johan Hedberg" <johan.hedberg@...il.com>,
 "Luiz Augusto von Dentz" <luiz.dentz@...il.com>,
 "Pablo Neira Ayuso" <pablo@...filter.org>,
 "Florian Westphal" <fw@...len.de>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/2] bits: introduce ffs_val()

On Fri, Jan 9, 2026, at 18:46, Petr Tesarik wrote:
> On Fri, 9 Jan 2026 12:16:06 -0500 Yury Norov <ynorov@...dia.com> wrote:
>> > diff --git a/MAINTAINERS b/MAINTAINERS
>> > index a0dd762f5648b..8f15c76a67ea2 100644
>> > --- a/MAINTAINERS
>> > +++ b/MAINTAINERS
>> > @@ -4466,6 +4466,7 @@ F:	arch/*/lib/bitops.c
>> >  F:	include/asm-generic/bitops
>> >  F:	include/asm-generic/bitops.h
>> >  F:	include/linux/bitops.h
>> > +F:	include/linux/ffs_val.h  
>> 
>> No need for a separate header. Just put int straight in bitops.h.
>
> Well, <linux/bitops.h> is a bit heavy, so I was afraid of spoiling
> build times if I include it from <asm-generic/div64.h>, but if you say
> it's fine, yes, why not, let's put it into bitops.h somewhere before
> #include <asm/bitops.h>.

A single macro definition makes zero difference for build times.

What makes linux/bitops.h expensive is the 419kb of preprocessed
source code that result from the generated atomics in asm/bitops.h
that get included everywhere.

    Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ