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] [day] [month] [year] [list]
Date:   Mon, 19 Jul 2021 16:46:56 +0800
From:   Rong Chen <rong.a.chen@...el.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        kernel test robot <lkp@...el.com>
Cc:     Dan Carpenter <error27@...il.com>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: [kbuild-all] Re: [linux-stable-rc:linux-4.4.y 1449/1774]
 drivers/input/joydev.c:485:16: warning: comparison of integer expressions of
 different signedness: 'int' and 'long unsigned int'



On 7/19/21 3:17 PM, Dan Carpenter wrote:
> On Mon, Jul 19, 2021 at 11:39:16AM +0800, kernel test robot wrote:
>>     drivers/input/joydev.c: In function 'joydev_handle_JSIOCSAXMAP':
>>     drivers/input/joydev.c:451:16: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
>>       451 |  for (i = 0; i < len && i < joydev->nabs; i++) {
> We should figure out a way to turn this warning off in the compiler.
>
> It's a stupid warning.  It never fixes any bugs.  It sometimes
> introduces bugs.
>
> In the kernel if you are in drivers/ and you have a loop which iterates
> over 2 million times that's probably a bug.  But GCC is very very
> stupid and not designed to be a static analysis tool.  It does not know
> which loops can iterate more than 2 million times.  Even when it knows
> that the loop only loops up to 5 or 10 times it still warns that maybe
> it will loop over 2 million times.  INSULTS AND DISPARAGEMENT!
>
> Seriously, please disable this warning unless you can point to one
> single bug that it has fixed.

Hi Dan,

Thanks for the explanation, we'll stop reporting this warning.

Best Regards,
Rong Chen

>
> regards,
> dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ