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: <397751ea-536b-af3c-752d-c4b1045e6e56@quicinc.com>
Date:   Tue, 26 Oct 2021 15:33:48 -0400
From:   Qian Cai <quic_qiancai@...cinc.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Yury Norov <yury.norov@...il.com>
CC:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bitmap: simplify GENMASK(size - 1, 0) lines



On 10/26/21 3:21 PM, Andy Shevchenko wrote:
> Can you explain to me how it is supposed to work?
> 
> For example,
> 
>     x = 0xaa55;
>     size = 5;
> 
>     printf("%lu\n", find_first_bit(&x, size));
> 
> In the resulting code we will always have 5 as the result,
> but is it correct one?

Sorry, my bad. GENMASK(size - 1, 0) would just become __GENMASK(size -
1, 0) instead of 0. Let me revisit it and run some tests first.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ