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: <5B599DB7.4050700@intel.com>
Date:   Thu, 26 Jul 2018 18:08:55 +0800
From:   Wei Wang <wei.w.wang@...el.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yury Norov <ynorov@...iumnetworks.com>,
        Jonathan Corbet <corbet@....net>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        dgilbert@...hat.com, Matthew Wilcox <mawilcox@...rosoft.com>
Subject: Re: [PATCH] linux/bitmap.h: fix BITMAP_LAST_WORD_MASK

On 07/26/2018 04:48 PM, Andy Shevchenko wrote:
> On Thu, Jul 26, 2018 at 11:07 AM, Wei Wang <wei.w.wang@...el.com> wrote:
>> The existing BITMAP_LAST_WORD_MASK macro returns 0xffffffff if nbits is
>> 0. This patch changes the macro to return 0 when there is no bit needs to
>> be masked.
>>
> Can you provide a practical example of what's going wrong before this
> patch applied?
>

The reason of making this patch is that I saw some other software which 
ports this function and has possibilities to fall into bugs with usages 
which pass 0 to the macro. So I wonder if it would be necessary to make 
such changes in case we would get a similar bug. Or adding something to 
explain that "0" is not applicable to this macro as a reminder to people 
who would use it.

Best,
Wei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ