From: Sasha Levin Date: Fri, 28 Jun 2019 22:58:15 +0000 (-0400) Subject: fixes for 4.14 X-Git-Tag: v5.1.16~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0317bbbba39489b442410803ac785a1d095a5db;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/revert-compiler.h-update-definition-of-unreachable.patch b/queue-4.14/revert-compiler.h-update-definition-of-unreachable.patch new file mode 100644 index 00000000000..cd0526c1579 --- /dev/null +++ b/queue-4.14/revert-compiler.h-update-definition-of-unreachable.patch @@ -0,0 +1,67 @@ +From 83dc3bf3104f2a4997a4d0858b6ba30b69524481 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 28 Jun 2019 16:36:14 -0400 +Subject: Revert "compiler.h: update definition of unreachable()" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit 82017e26e51596ee577171a33f357377ec6513b5, which is +upstream commit fe0640eb30b7da261ae84d252ed9ed3c7e68dfd8. + +On Fri, Jun 28, 2019 at 8:53 AM Tony Battersby wrote: +> +> Old versions of gcc cannot compile 4.14 since 4.14.113: +> +> ./include/asm-generic/fixmap.h:37: error: implicit declaration of function ‘__builtin_unreachable’ +> +> The stable commit that caused the problem is 82017e26e515 ("compiler.h: +> update definition of unreachable()") (upstream commit fe0640eb30b7). +> Reverting the commit fixes the problem. +> +> Kernel 4.17 dropped support for older versions of gcc in upstream commit +> cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). This +> was not backported to 4.14 since that would go against the stable kernel +> rules. +> +> Upstream commit 815f0ddb346c ("include/linux/compiler*.h: make +> compiler-*.h mutually exclusive") was a fix for cafa0010cd51. This was +> not backported to 4.14. +> +> Upstream commit fe0640eb30b7 ("compiler.h: update definition of +> unreachable()") was a fix for 815f0ddb346c. This is the commit that was +> backported to 4.14. But it only fixed a problem introduced in the other +> commits, and without those commits, it ends up introducing a problem +> instead of fixing one. So I recommend reverting that patch in 4.14, +> which will enable old gcc to compile 4.14 again. If I understand +> correctly, I believe that clang will still be able to compile 4.14 with +> the patch reverted, although I haven't tried to compile with clang. +> +> The problematic commit is not present in 4.9.x, 4.4.x, 3.18.x, or 3.16.x. + +CC: Nick Desaulniers +CC: Tony Battersby , +Signed-off-by: Sasha Levin +--- + include/linux/compiler.h | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/include/linux/compiler.h b/include/linux/compiler.h +index 67c3934fb9ed..a704d032713b 100644 +--- a/include/linux/compiler.h ++++ b/include/linux/compiler.h +@@ -119,10 +119,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, + # define ASM_UNREACHABLE + #endif + #ifndef unreachable +-# define unreachable() do { \ +- annotate_unreachable(); \ +- __builtin_unreachable(); \ +-} while (0) ++# define unreachable() do { annotate_reachable(); do { } while (1); } while (0) + #endif + + /* +-- +2.20.1 + diff --git a/queue-4.14/series b/queue-4.14/series index 8795a73e993..563685741a8 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -12,3 +12,4 @@ block-bio_iov_iter_get_pages-pin-more-pages-for-mult.patch 9p-p9dirent_read-check-network-provided-name-length.patch net-9p-include-trans_common.h-to-fix-missing-prototy.patch qmi_wwan-fix-out-of-bounds-read.patch +revert-compiler.h-update-definition-of-unreachable.patch