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: <YAlXMj7sIoPjZP3W@smile.fi.intel.com>
Date:   Thu, 21 Jan 2021 12:28:02 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
        linux-sh@...r.kernel.org, linux-arch@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>, Arnd Bergmann <arnd@...db.de>,
        Dennis Zhou <dennis@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        David Sterba <dsterba@...e.com>,
        Stefano Brivio <sbrivio@...hat.com>,
        "Ma, Jianpeng" <jianpeng.ma@...el.com>,
        Wei Yang <richard.weiyang@...ux.alibaba.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Rasmus Villemoes <rasmus.villemoes@...vas.dk>
Subject: Re: [PATCH 4/6] lib: inline _find_next_bit() wrappers

On Wed, Jan 20, 2021 at 04:06:28PM -0800, Yury Norov wrote:
> lib/find_bit.c declares five single-line wrappers for _find_next_bit().
> We may turn those wrappers to inline functions. It eliminates
> unneeded function calls and opens room for compile-time optimizations.

...

> --- a/include/asm-generic/bitops/le.h
> +++ b/include/asm-generic/bitops/le.h
> @@ -4,6 +4,7 @@
>  
>  #include <asm/types.h>
>  #include <asm/byteorder.h>
> +#include <asm-generic/bitops/find.h>

I'm wondering if generic header inclusion should go before arch-dependent ones.

...

> -#ifndef find_next_bit

> -#ifndef find_next_zero_bit

> -#if !defined(find_next_and_bit)

> -#ifndef find_next_zero_bit_le

> -#ifndef find_next_bit_le

Shouldn't you leave these in new wrappers as well?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ