From: Greg Kroah-Hartman Date: Wed, 20 Jan 2021 10:58:50 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.4.253~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7d5bc496aec5345f5e5593b61a3d1685b6e3eb9;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch --- diff --git a/queue-4.9/compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch b/queue-4.9/compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch new file mode 100644 index 00000000000..df2f1b02cdd --- /dev/null +++ b/queue-4.9/compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch @@ -0,0 +1,56 @@ +From dca5244d2f5b94f1809f0c02a549edf41ccd5493 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Tue, 12 Jan 2021 22:48:32 +0000 +Subject: compiler.h: Raise minimum version of GCC to 5.1 for arm64 + +From: Will Deacon + +commit dca5244d2f5b94f1809f0c02a549edf41ccd5493 upstream. + +GCC versions >= 4.9 and < 5.1 have been shown to emit memory references +beyond the stack pointer, resulting in memory corruption if an interrupt +is taken after the stack pointer has been adjusted but before the +reference has been executed. This leads to subtle, infrequent data +corruption such as the EXT4 problems reported by Russell King at the +link below. + +Life is too short for buggy compilers, so raise the minimum GCC version +required by arm64 to 5.1. + +Reported-by: Russell King +Suggested-by: Arnd Bergmann +Signed-off-by: Will Deacon +Tested-by: Nathan Chancellor +Reviewed-by: Nick Desaulniers +Reviewed-by: Nathan Chancellor +Acked-by: Linus Torvalds +Cc: +Cc: Theodore Ts'o +Cc: Florian Weimer +Cc: Peter Zijlstra +Cc: Nick Desaulniers +Link: https://lore.kernel.org/r/20210105154726.GD1551@shell.armlinux.org.uk +Link: https://lore.kernel.org/r/20210112224832.10980-1-will@kernel.org +Signed-off-by: Catalin Marinas +[will: backport to 4.4.y/4.9.y/4.14.y] +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/compiler-gcc.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/include/linux/compiler-gcc.h ++++ b/include/linux/compiler-gcc.h +@@ -149,6 +149,12 @@ + + #if GCC_VERSION < 30200 + # error Sorry, your compiler is too old - please upgrade it. ++#elif defined(CONFIG_ARM64) && GCC_VERSION < 50100 ++/* ++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 ++ * https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk ++ */ ++# error Sorry, your version of GCC is too old - please use 5.1 or newer. + #endif + + #if GCC_VERSION < 30300 diff --git a/queue-4.9/series b/queue-4.9/series index 5ca11297d79..f215617632c 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -21,3 +21,4 @@ mm-slub-consider-rest-of-partial-list-if-acquire_slab-fails.patch net-sunrpc-interpret-the-return-value-of-kstrtou32-correctly.patch netfilter-conntrack-fix-reading-nf_conntrack_buckets.patch usb-ohci-make-distrust_firmware-param-default-to-false.patch +compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch