From 06b394d08d4eaedaa5a04224fdb163dbe4f042a1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 20 Jan 2021 11:58:32 +0100 Subject: [PATCH] 4.4-stable patches added patches: compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch --- ...imum-version-of-gcc-to-5.1-for-arm64.patch | 56 +++++++++++++++++++ queue-4.4/series | 1 + 2 files changed, 57 insertions(+) create mode 100644 queue-4.4/compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch diff --git a/queue-4.4/compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch b/queue-4.4/compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch new file mode 100644 index 00000000000..440ec2f2024 --- /dev/null +++ b/queue-4.4/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 +@@ -145,6 +145,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.4/series b/queue-4.4/series index c517eafbb25..6ab79f68f6b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -17,3 +17,4 @@ rdma-usnic-fix-memleak-in-find_free_vf_and_create_qp_grp.patch mm-slub-consider-rest-of-partial-list-if-acquire_slab-fails.patch net-sunrpc-interpret-the-return-value-of-kstrtou32-correctly.patch usb-ohci-make-distrust_firmware-param-default-to-false.patch +compiler.h-raise-minimum-version-of-gcc-to-5.1-for-arm64.patch -- 2.47.3