From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, Kees Cook <kees@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
Guenter Roeck <linux@roeck-us.net>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 6.1 09/10] gcc: disable -Warray-bounds for gcc-11 too
Date: Thu, 12 Jan 2023 14:56:30 +0100 [thread overview]
Message-ID: <20230112135327.373332907@linuxfoundation.org> (raw)
In-Reply-To: <20230112135326.981869724@linuxfoundation.org>
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 5a41237ad1d4b62008f93163af1d9b1da90729d8 upstream.
We had already disabled this warning for gcc-12 due to bugs in the value
range analysis, but it turns out we end up having some similar problems
with gcc-11.3 too, so let's disable it there too.
Older gcc versions end up being increasingly less relevant, and
hopefully clang and newer version of gcc (ie gcc-13) end up working
reliably enough that we still get the build coverage even when we
disable this for some versions.
Link: https://lore.kernel.org/all/20221227002941.GA2691687@roeck-us.net/
Link: https://lore.kernel.org/all/D8BDBF66-E44C-45D4-9758-BAAA4F0C1998@kernel.org/
Cc: Kees Cook <kees@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
init/Kconfig | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -892,13 +892,17 @@ config CC_IMPLICIT_FALLTHROUGH
default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
-# Currently, disable gcc-12 array-bounds globally.
+# Currently, disable gcc-11,12 array-bounds globally.
# We may want to target only particular configurations some day.
+config GCC11_NO_ARRAY_BOUNDS
+ def_bool y
+
config GCC12_NO_ARRAY_BOUNDS
def_bool y
config CC_NO_ARRAY_BOUNDS
bool
+ default y if CC_IS_GCC && GCC_VERSION >= 110000 && GCC_VERSION < 120000 && GCC11_NO_ARRAY_BOUNDS
default y if CC_IS_GCC && GCC_VERSION >= 120000 && GCC_VERSION < 130000 && GCC12_NO_ARRAY_BOUNDS
#
next prev parent reply other threads:[~2023-01-12 13:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 13:56 [PATCH 6.1 00/10] 6.1.6-rc1 review Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 01/10] parisc: Align parisc MADV_XXX constants with all other architectures Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 02/10] x86/fpu: Take task_struct* in copy_sigframe_from_user_to_xstate() Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 03/10] x86/fpu: Add a pkru argument to copy_uabi_from_kernel_to_xstate() Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 04/10] x86/fpu: Add a pkru argument to copy_uabi_to_xstate() Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 05/10] x86/fpu: Allow PKRU to be (once again) written by ptrace Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 06/10] x86/fpu: Emulate XRSTORs behavior if the xfeatures PKRU bit is not set Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 07/10] selftests/vm/pkeys: Add a regression test for setting PKRU through ptrace Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 6.1 08/10] Revert "SUNRPC: Use RMW bitops in single-threaded hot paths" Greg Kroah-Hartman
2023-01-12 13:56 ` Greg Kroah-Hartman [this message]
2023-01-16 5:44 ` [PATCH 6.1 09/10] gcc: disable -Warray-bounds for gcc-11 too Jiri Slaby
2023-01-12 13:56 ` [PATCH 6.1 10/10] net: sched: disallow noqueue for qdisc classes Greg Kroah-Hartman
2023-01-12 18:45 ` [PATCH 6.1 00/10] 6.1.6-rc1 review Conor Dooley
2023-01-13 0:27 ` Shuah Khan
2023-01-13 1:37 ` Kelsey Steele
2023-01-13 3:02 ` ogasawara takeshi
2023-01-13 5:51 ` Guenter Roeck
2023-01-13 8:58 ` Bagas Sanjaya
2023-01-13 9:40 ` Ron Economos
2023-01-13 12:30 ` Sudip Mukherjee
2023-01-13 13:18 ` Jon Hunter
2023-01-13 17:32 ` Naresh Kamboju
2023-01-13 18:06 ` Allen Pais
2023-01-14 5:00 ` Rudi Heitbaum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230112135327.373332907@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=kees@kernel.org \
--cc=linux@roeck-us.net \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.