From 1064766525a27bf3b5970332e8a5f8bbeac6838f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 5 Jul 2019 18:23:40 +0200 Subject: [PATCH] 4.9-stable patches added patches: arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch --- ...ed-__builtin_trap-for-older-compiler.patch | 37 +++++++++++++++++++ queue-4.9/series | 1 + 2 files changed, 38 insertions(+) create mode 100644 queue-4.9/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch diff --git a/queue-4.9/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch b/queue-4.9/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch new file mode 100644 index 00000000000..7d694b14ca3 --- /dev/null +++ b/queue-4.9/arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch @@ -0,0 +1,37 @@ +From af1be2e21203867cb958aaceed5366e2e24b88e8 Mon Sep 17 00:00:00 2001 +From: Vineet Gupta +Date: Fri, 8 Dec 2017 08:45:57 -0800 +Subject: ARC: handle gcc generated __builtin_trap for older compiler + +From: Vineet Gupta + +commit af1be2e21203867cb958aaceed5366e2e24b88e8 upstream. + +ARC gcc prior to GNU 2018.03 release didn't have a target specific +__builtin_trap() implementation, generating default abort() call. + +Implement the abort() call - emulating what newer gcc does for the same, +as suggested by Arnd. + +Acked-by: Arnd Bergmann +Signed-off-by: Vineet Gupta +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arc/kernel/traps.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/arch/arc/kernel/traps.c ++++ b/arch/arc/kernel/traps.c +@@ -155,3 +155,11 @@ void do_insterror_or_kprobe(unsigned lon + + insterror_is_error(address, regs); + } ++ ++/* ++ * abort() call generated by older gcc for __builtin_trap() ++ */ ++void abort(void) ++{ ++ __asm__ __volatile__("trap_s 5\n"); ++} diff --git a/queue-4.9/series b/queue-4.9/series index e22bdc7939d..f0eafb2c803 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -78,6 +78,7 @@ mips-netlogic-xlr-remove-erroneous-check-in-nlm_fmn_.patch mfd-omap-usb-tll-fix-register-offsets.patch arc-fix-allnoconfig-build-warning.patch bug.h-work-around-gcc-pr82365-in-bug.patch +arc-handle-gcc-generated-__builtin_trap-for-older-compiler.patch drm-i915-dmc-protect-against-reading-random-memory.patch mips-workaround-gcc-__builtin_unreachable-reordering.patch ptrace-fix-ptracer_cred-handling-for-ptrace_traceme.patch -- 2.47.3