]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0141-x86-irq-64-Print-the-offending-IP-in-the-stack-overf.patch
add objtool build fix
[pve-kernel.git] / patches / kernel / 0141-x86-irq-64-Print-the-offending-IP-in-the-stack-overf.patch
CommitLineData
321d628a
FG
1From 3c131c80b6a5a95ab9a24e444ef02eba38710840 Mon Sep 17 00:00:00 2001
2From: Andy Lutomirski <luto@kernel.org>
3Date: Mon, 4 Dec 2017 15:07:11 +0100
b378f209 4Subject: [PATCH 141/233] x86/irq/64: Print the offending IP in the stack
321d628a
FG
5 overflow warning
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10CVE-2017-5754
11
12In case something goes wrong with unwind (not unlikely in case of
13overflow), print the offending IP where we detected the overflow.
14
15Signed-off-by: Andy Lutomirski <luto@kernel.org>
16Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17Reviewed-by: Borislav Petkov <bp@suse.de>
18Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
19Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
20Cc: Borislav Petkov <bp@alien8.de>
21Cc: Borislav Petkov <bpetkov@suse.de>
22Cc: Brian Gerst <brgerst@gmail.com>
23Cc: Dave Hansen <dave.hansen@intel.com>
24Cc: Dave Hansen <dave.hansen@linux.intel.com>
25Cc: David Laight <David.Laight@aculab.com>
26Cc: Denys Vlasenko <dvlasenk@redhat.com>
27Cc: Eduardo Valentin <eduval@amazon.com>
28Cc: Greg KH <gregkh@linuxfoundation.org>
29Cc: H. Peter Anvin <hpa@zytor.com>
30Cc: Josh Poimboeuf <jpoimboe@redhat.com>
31Cc: Juergen Gross <jgross@suse.com>
32Cc: Linus Torvalds <torvalds@linux-foundation.org>
33Cc: Peter Zijlstra <peterz@infradead.org>
34Cc: Rik van Riel <riel@redhat.com>
35Cc: Will Deacon <will.deacon@arm.com>
36Cc: aliguori@amazon.com
37Cc: daniel.gruss@iaik.tugraz.at
38Cc: hughd@google.com
39Cc: keescook@google.com
40Link: https://lkml.kernel.org/r/20171204150605.231677119@linutronix.de
41Signed-off-by: Ingo Molnar <mingo@kernel.org>
42(cherry picked from commit 4f3789e792296e21405f708cf3cb409d7c7d5683)
43Signed-off-by: Andy Whitcroft <apw@canonical.com>
44Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
45(cherry picked from commit aa820446b0d31df0870b176257b40baadaf4444c)
46Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
47---
48 arch/x86/kernel/irq_64.c | 4 ++--
49 1 file changed, 2 insertions(+), 2 deletions(-)
50
51diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
52index 3be74fbdeff2..feca14980e32 100644
53--- a/arch/x86/kernel/irq_64.c
54+++ b/arch/x86/kernel/irq_64.c
55@@ -56,10 +56,10 @@ static inline void stack_overflow_check(struct pt_regs *regs)
56 if (regs->sp >= estack_top && regs->sp <= estack_bottom)
57 return;
58
59- WARN_ONCE(1, "do_IRQ(): %s has overflown the kernel stack (cur:%Lx,sp:%lx,irq stk top-bottom:%Lx-%Lx,exception stk top-bottom:%Lx-%Lx)\n",
60+ WARN_ONCE(1, "do_IRQ(): %s has overflown the kernel stack (cur:%Lx,sp:%lx,irq stk top-bottom:%Lx-%Lx,exception stk top-bottom:%Lx-%Lx,ip:%pF)\n",
61 current->comm, curbase, regs->sp,
62 irq_stack_top, irq_stack_bottom,
63- estack_top, estack_bottom);
64+ estack_top, estack_bottom, (void *)regs->ip);
65
66 if (sysctl_panic_on_stackoverflow)
67 panic("low stack detected by irq handler - check messages\n");
68--
692.14.2
70