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]
Date:   Fri, 15 Jun 2018 11:30:23 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH v2] bitfield: fix *_encode_bits()

On Fri, 2018-06-15 at 11:51 +0300, Andy Shevchenko wrote:
> On Fri, Jun 15, 2018 at 12:26 AM, Johannes Berg
> <johannes@...solutions.net> wrote:
> > There's a bug in *_encode_bits() in using ~field_multiplier() for
> > the check whether or not the constant value fits into the field,
> > this is wrong and clearly ~field_mask() was intended. This was
> > triggering for me for both constant and non-constant values.
> > 
> > Additionally, make this case actually into an compile error.
> > Declaring the extern function that will never exist with just a
> > warning is pointless as then later we'll just get a link error.
> > 
> > While at it, also fix the indentation in those lines I'm touching.
> 
> I'm just wondering if we have test cases for that API.
> If not, perhaps it's a good time to start (perhaps extend test_bitmap.c)?

I guess. Do we have infrastructure to provoke & check compile errors
though?

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ