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: <YXgafyMzK+o9FYkN@smile.fi.intel.com>
Date:   Tue, 26 Oct 2021 18:10:55 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Qian Cai <quic_qiancai@...cinc.com>
Cc:     Yury Norov <yury.norov@...il.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bitmap: simplify GENMASK(size - 1, 0) lines

On Tue, Oct 26, 2021 at 10:41:08AM -0400, Qian Cai wrote:
> Since "size" is an "unsigned int", the rvalue "size - 1" will still be
> "unsigned int" according to the C standard (3.2.1.5 Usual arithmetic
> conversions). Therefore, GENMASK(size - 1, 0) will always return 0UL.

Huh?!

Have you run test_bitmap et al., btw?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ