]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2019 18:32:02 +0000 (20:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2019 18:32:02 +0000 (20:32 +0200)
added patches:
x86-build-add-wnoaddress-of-packed-member-to-realmode_cflags-to-silence-gcc9-build-warning.patch

queue-4.19/series
queue-4.19/x86-build-add-wnoaddress-of-packed-member-to-realmode_cflags-to-silence-gcc9-build-warning.patch [new file with mode: 0644]

index 229909126d76a723e9553c6b5e56f55d27d9b9f2..ef2eb8905ece759c89474d00204979cc8c95ca78 100644 (file)
@@ -47,3 +47,4 @@ modules-fix-compile-error-if-don-t-have-strict-module-rwx.patch
 platform-x86-pmc_atom-add-cb4063-beckhoff-automation-board-to-critclk_systems-dmi-table.patch
 rsi-fix-a-double-free-bug-in-rsi_91x_deinit.patch
 nvmem-use-the-same-permissions-for-eeprom-as-for-nvmem.patch
+x86-build-add-wnoaddress-of-packed-member-to-realmode_cflags-to-silence-gcc9-build-warning.patch
diff --git a/queue-4.19/x86-build-add-wnoaddress-of-packed-member-to-realmode_cflags-to-silence-gcc9-build-warning.patch b/queue-4.19/x86-build-add-wnoaddress-of-packed-member-to-realmode_cflags-to-silence-gcc9-build-warning.patch
new file mode 100644 (file)
index 0000000..dca17c7
--- /dev/null
@@ -0,0 +1,52 @@
+From 42e0e95474fc6076b5cd68cab8fa0340a1797a72 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Wed, 28 Aug 2019 10:56:48 +0200
+Subject: x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 42e0e95474fc6076b5cd68cab8fa0340a1797a72 upstream.
+
+One of the very few warnings I have in the current build comes from
+arch/x86/boot/edd.c, where I get the following with a gcc9 build:
+
+   arch/x86/boot/edd.c: In function ‘query_edd’:
+   arch/x86/boot/edd.c:148:11: warning: taking address of packed member of ‘struct boot_params’ may result in an unaligned pointer value [-Waddress-of-packed-member]
+     148 |  mbrptr = boot_params.edd_mbr_sig_buffer;
+         |           ^~~~~~~~~~~
+
+This warning triggers because we throw away all the CFLAGS and then make
+a new set for REALMODE_CFLAGS, so the -Wno-address-of-packed-member we
+added in the following commit is not present:
+
+  6f303d60534c ("gcc-9: silence 'address-of-packed-member' warning")
+
+The simplest solution for now is to adjust the warning for this version
+of CFLAGS as well, but it would definitely make sense to examine whether
+REALMODE_CFLAGS could be derived from CFLAGS, so that it picks up changes
+in the compiler flags environment automatically.
+
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Borislav Petkov <bp@alien8.de>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/Makefile |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -38,6 +38,7 @@ REALMODE_CFLAGS      := $(M16_CFLAGS) -g -Os
+ REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
+ REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
++REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member)
+ REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))
+ export REALMODE_CFLAGS