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: <41eff9b4-3041-4a1e-ba28-b16d866cd894@intel.com>
Date:   Mon, 6 Nov 2023 14:39:48 +0100
From:   Alexander Lobakin <aleksander.lobakin@...el.com>
To:     Nuno Sá <noname.nuno@...il.com>,
        Nuno Sa <nuno.sa@...log.com>
CC:     Dan Carpenter <dan.carpenter@...aro.org>,
        <oe-kbuild@...ts.linux.dev>, <lkp@...el.com>,
        <oe-kbuild-all@...ts.linux.dev>,
        Przemek Kitszel <przemyslaw.kitszel@...el.com>,
        <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [alobakin:pfcp 5/20] drivers/iio/imu/adis16475.c:363
 adis16475_set_freq() warn: set_bit() takes a bit number

From: Nuno Sá <noname.nuno@...il.com>
Date: Mon, 06 Nov 2023 13:02:58 +0100

> On Mon, 2023-11-06 at 12:18 +0100, Alexander Lobakin wrote:
>> From: Nuno Sá <noname.nuno@...il.com>
>> Date: Mon, 06 Nov 2023 11:07:16 +0100

[...]

>> assign_bit() does not take a bitmask as a first argument, but a bit number.
>>
>> I.e. if you want to switch BIT(0), you call it like assign_bit(0, ...),
>> not assign_bit(BIT(0), ...). Same for the bit nr 1.
>>
> 
> Yes, I know... if you look at my reply to Dan you can see I realized that already :) 

Oh okay :)

> 
> I guess by the time I first sent this time I didn't knew or maybe just a dumb
> mistake...
> 
> I'll send a patch later today removing the BIT() from the #define, thx!

Nice! Don't forget the tags the build bot asked for :p

BTW, I believe the reason why this warning triggered after my commit is
that before it, assign_bit() is a static inline, but becomes a macro
then. smatch becomes able to see through it that it indeed is a wrapper
around set_bit()/clear_bit() and realizes the first argument is invalid.

> 
> - Nuno Sá
> 

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ