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: <4e1abf0c252ed1f049e1be77247626af369aa5e8.camel@intel.com>
Date:   Mon, 1 Nov 2021 07:29:29 +0000
From:   "Coelho, Luciano" <luciano.coelho@...el.com>
To:     "arnd@...nel.org" <arnd@...nel.org>,
        "kvalo@...eaurora.org" <kvalo@...eaurora.org>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "Berg, Johannes" <johannes.berg@...el.com>,
        "Baruch, Yaara" <yaara.baruch@...el.com>,
        "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "nathan@...nel.org" <nathan@...nel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "Gottlieb, Matti" <matti.gottlieb@...el.com>,
        "ndesaulniers@...gle.com" <ndesaulniers@...gle.com>,
        "Grumbach, Emmanuel" <emmanuel.grumbach@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "arnd@...db.de" <arnd@...db.de>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] iwlwifi: pcie: fix constant-conversion warning

On Sun, 2021-10-31 at 09:06 +0200, Kalle Valo wrote:
> Arnd Bergmann <arnd@...nel.org> writes:
> 
> > From: Arnd Bergmann <arnd@...db.de>
> > 
> > clang points out a potential issue with integer overflow when
> > the iwl_dev_info_table[] array is empty:
> > 
> > drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1344:42: error: implicit conversion from 'unsigned long' to 'int' changes value from 18446744073709551615 to -1 [-Werror,-Wconstant-conversion]
> >         for (i = ARRAY_SIZE(iwl_dev_info_table) - 1; i >= 0; i--) {
> >                ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
> > 
> > This is still harmless, as the loop correctly terminates, but adding
> > an (int) cast makes that clearer to the compiler.
> > 
> > Fixes: 3f7320428fa4 ("iwlwifi: pcie: simplify iwl_pci_find_dev_info()")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> 
> Luca, can I take this to wireless-drivers? Ack?

Yes, please do.

Thanks.

Acked-by: Luca Coelho <luciano.coelho@...el.com>

--
Cheers,
Luca.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ