2022-10-06 19:22:05

by Kees Cook

[permalink] [raw]
Subject: [PATCH] wifi: carl9170: Remove -Warray-bounds exception

GCC-12 emits false positive -Warray-bounds warnings with
CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1],
and there is top-level Makefile logic to remove -Warray-bounds for
known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable
'-Warray-bounds' universally for now").

Remove the local work-around.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679

Signed-off-by: Kees Cook <[email protected]>
---
drivers/net/wireless/ath/carl9170/Makefile | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/ath/carl9170/Makefile b/drivers/net/wireless/ath/carl9170/Makefile
index 7463baa62fa8..1a81868ce26d 100644
--- a/drivers/net/wireless/ath/carl9170/Makefile
+++ b/drivers/net/wireless/ath/carl9170/Makefile
@@ -3,8 +3,3 @@ carl9170-objs := main.o usb.o cmd.o mac.o phy.o led.o fw.o tx.o rx.o
carl9170-$(CONFIG_CARL9170_DEBUGFS) += debug.o

obj-$(CONFIG_CARL9170) += carl9170.o
-
-# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
-ifndef KBUILD_EXTRA_WARN
-CFLAGS_cmd.o += -Wno-array-bounds
-endif
--
2.34.1



2022-10-06 20:09:29

by Christian Lamparter

[permalink] [raw]
Subject: Re: [PATCH] wifi: carl9170: Remove -Warray-bounds exception

On 06/10/2022 21:20, Kees Cook wrote:
> GCC-12 emits false positive -Warray-bounds warnings with
> CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1],
> and there is top-level Makefile logic to remove -Warray-bounds for
> known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable
> '-Warray-bounds' universally for now").
>
> Remove the local work-around.
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679
>
> Signed-off-by: Kees Cook <[email protected]>
Acked-by: Christian Lamparter <[email protected]>

2022-10-12 06:41:24

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: carl9170: Remove -Warray-bounds exception

Kees Cook <[email protected]> wrote:

> GCC-12 emits false positive -Warray-bounds warnings with
> CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1],
> and there is top-level Makefile logic to remove -Warray-bounds for
> known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable
> '-Warray-bounds' universally for now").
>
> Remove the local work-around.
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679
>
> Signed-off-by: Kees Cook <[email protected]>
> Acked-by: Christian Lamparter <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

2577a58df244 wifi: carl9170: Remove -Warray-bounds exception

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

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