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:   Sat, 21 May 2022 09:58:28 +0300
From:   Kalle Valo <kvalo@...nel.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     johannes@...solutions.net, netdev@...r.kernel.org,
        linux-wireless@...r.kernel.org, toke@...e.dk,
        linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH net-next 2/8] wifi: ath9k: silence array-bounds warning on GCC 12

+ arnd, kees, lkml

Jakub Kicinski <kuba@...nel.org> writes:

> GCC 12 says:
>
> drivers/net/wireless/ath/ath9k/mac.c: In function ‘ath9k_hw_resettxqueue’:
> drivers/net/wireless/ath/ath9k/mac.c:373:22: warning: array subscript
> 32 is above array bounds of ‘struct ath9k_tx_queue_info[10]’
> [-Warray-bounds]
>   373 |         qi = &ah->txq[q];
>       |               ~~~~~~~^~~
>
> I don't know where it got the 32 from, relegate the warning to W=1+.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: toke@...e.dk
> CC: kvalo@...nel.org
> CC: linux-wireless@...r.kernel.org
> ---
>  drivers/net/wireless/ath/ath9k/Makefile | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath9k/Makefile b/drivers/net/wireless/ath/ath9k/Makefile
> index eff94bcd1f0a..9bdfcee2f448 100644
> --- a/drivers/net/wireless/ath/ath9k/Makefile
> +++ b/drivers/net/wireless/ath/ath9k/Makefile
> @@ -45,6 +45,11 @@ ath9k_hw-y:=	\
>  		ar9003_eeprom.o \
>  		ar9003_paprd.o
>  
> +# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
> +ifndef KBUILD_EXTRA_WARN
> +CFLAGS_mac.o += -Wno-array-bounds
> +endif

There are now four wireless drivers which need this hack. Wouldn't it be
easier to add -Wno-array-bounds for GCC 12 globally instead of adding
the same hack to multiple drivers?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ