linux-stable/arch/s390
Linus Torvalds f0be87c42c gcc-12: disable '-Warray-bounds' universally for now
In commit 8b202ee218 ("s390: disable -Warray-bounds") the s390 people
disabled the '-Warray-bounds' warning for gcc-12, because the new logic
in gcc would cause warnings for their use of the S390_lowcore macro,
which accesses absolute pointers.

It turns out gcc-12 has many other issues in this area, so this takes
that s390 warning disable logic, and turns it into a kernel build config
entry instead.

Part of the intent is that we can make this all much more targeted, and
use this conflig flag to disable it in only particular configurations
that cause problems, with the s390 case as an example:

        select GCC12_NO_ARRAY_BOUNDS

and we could do that for other configuration cases that cause issues.

Or we could possibly use the CONFIG_CC_NO_ARRAY_BOUNDS thing in a more
targeted way, and disable the warning only for particular uses: again
the s390 case as an example:

  KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_NO_ARRAY_BOUNDS),-Wno-array-bounds)

but this ends up just doing it globally in the top-level Makefile, since
the current issues are spread fairly widely all over:

  KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds

We'll try to limit this later, since the gcc-12 problems are rare enough
that *much* of the kernel can be built with it without disabling this
warning.

Cc: Kees Cook <keescook@chromium.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-06-09 10:11:12 -07:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot Kbuild updates for v5.19 2022-05-26 12:09:50 -07:00
configs s390: enable CONFIG_HARDENED_USERCOPY in debug_defconfig 2022-04-12 11:56:08 +02:00
crypto more s390 updates for 5.19 merge window 2022-06-03 13:57:50 -07:00
hypfs s390/hypfs: fix typos in comments 2022-05-06 20:45:13 +02:00
include more s390 updates for 5.19 merge window 2022-06-03 13:57:50 -07:00
kernel This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
kvm Bitmap patches for 5.19-rc1 2022-06-04 14:04:27 -07:00
lib s390/alternatives: provide identical sized orginal/alternative sequences 2022-05-17 15:16:28 +02:00
mm more s390 updates for 5.19 merge window 2022-06-03 13:57:50 -07:00
net s390/bpf: Fix typo in comment 2022-05-23 11:25:53 -07:00
pci s390/pci: add error record for CC 2 retries 2022-04-25 13:54:15 +02:00
purgatory s390/purgatory: workaround llvm's IAS limitations 2022-05-17 15:16:28 +02:00
tools s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig gcc-12: disable '-Warray-bounds' universally for now 2022-06-09 10:11:12 -07:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile gcc-12: disable '-Warray-bounds' universally for now 2022-06-09 10:11:12 -07:00