]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 11:28:27 +0000 (13:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 11:28:27 +0000 (13:28 +0200)
added patches:
makefile.extrawarn-move-wcast-function-type-strict-to-w-1.patch

queue-4.9/makefile.extrawarn-move-wcast-function-type-strict-to-w-1.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/makefile.extrawarn-move-wcast-function-type-strict-to-w-1.patch b/queue-4.9/makefile.extrawarn-move-wcast-function-type-strict-to-w-1.patch
new file mode 100644 (file)
index 0000000..486acff
--- /dev/null
@@ -0,0 +1,38 @@
+From 2120635108b35ecad9c59c8b44f6cbdf4f98214e Mon Sep 17 00:00:00 2001
+From: Sami Tolvanen <samitolvanen@google.com>
+Date: Fri, 30 Sep 2022 20:33:10 +0000
+Subject: Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
+
+From: Sami Tolvanen <samitolvanen@google.com>
+
+commit 2120635108b35ecad9c59c8b44f6cbdf4f98214e upstream.
+
+We enable -Wcast-function-type globally in the kernel to warn about
+mismatching types in function pointer casts. Compilers currently
+warn only about ABI incompability with this flag, but Clang 16 will
+enable a stricter version of the check by default that checks for an
+exact type match. This will be very noisy in the kernel, so disable
+-Wcast-function-type-strict without W=1 until the new warnings have
+been addressed.
+
+Cc: stable@vger.kernel.org
+Link: https://reviews.llvm.org/D134831
+Link: https://github.com/ClangBuiltLinux/linux/issues/1724
+Suggested-by: Nathan Chancellor <nathan@kernel.org>
+Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
+Signed-off-by: Kees Cook <keescook@chromium.org>
+Link: https://lore.kernel.org/r/20220930203310.4010564-1-samitolvanen@google.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/Makefile.extrawarn |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/scripts/Makefile.extrawarn
++++ b/scripts/Makefile.extrawarn
+@@ -72,5 +72,6 @@ KBUILD_CFLAGS += $(call cc-disable-warni
+ KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
+ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
+ KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)
++KBUILD_CFLAGS += $(call cc-disable-warning, cast-function-type-strict)
+ endif
+ endif
index db565db31136c8f536164e89c2dae8aa44f19a84..93bbf6b65bda393e5e2a2d22494ee215d994f455 100644 (file)
@@ -13,3 +13,4 @@ nvme-fix-ioc_pr_clear-and-ioc_pr_release-ioctls-for-.patch
 selftests-fix-the-if-conditions-of-in-test_extra_fil.patch
 clk-iproc-minor-tidy-up-of-iproc-pll-data-structures.patch
 clk-iproc-do-not-rely-on-node-name-for-correct-pll-s.patch
+makefile.extrawarn-move-wcast-function-type-strict-to-w-1.patch