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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Nov 2022 08:03:35 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     wangkailong@...i.cn, jdelvare@...e.com,
        linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (amc6821) Fix unsigned expression compared with
 zero



On 11/3/22 07:17, Guenter Roeck wrote:
> On Wed, Nov 02, 2022 at 07:59:06PM -0700, Randy Dunlap wrote:
>>
>>
>> On 11/2/22 19:27, wangkailong@...i.cn wrote:
>>> Fix the following coccicheck warning:
>>>
>>> drivers/hwmon/amc6821.c:215: WARNING: Unsigned expression compared
>>> with zero: reg > 0
>>> drivers/hwmon/amc6821.c:228: WARNING: Unsigned expression compared
>>> with zero: reg > 0
>>>
>>> Signed-off-by: KaiLong Wang <wangkailong@...i.cn>
>>
>> Hm. IDGI. What's wrong with comparing an unsigned value to > 0?
>> I mean, it could be == 0 or > 0.
>> Please explain.
> 
> I don't get it either. The real problem with this driver is that error
> returns from i2c functions are not checked. However, that problem is not
> fixed by this patch. That means the patch would change behavior without
> fixing the actual problem.
> 
> I wonder what kind of (broken) compiler or analyzer produces above errors.
> We'll have to watch out for similar broken "fixes".

It says above that it's a coccicheck warning.

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ