summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kdebug.h
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2019-12-19 00:11:49 +0100
committerBorislav Petkov <bp@suse.de>2019-12-31 13:11:35 +0100
commitaa49f20462c90df4150f33d245cbcfe0d9c80350 (patch)
treef12401b0d8f5f80a0e290ae66b3587f74c088b1f /arch/x86/include/asm/kdebug.h
parentx86/traps: Print address on #GP (diff)
downloadlinux-aa49f20462c90df4150f33d245cbcfe0d9c80350.tar.xz
linux-aa49f20462c90df4150f33d245cbcfe0d9c80350.zip
x86/dumpstack: Introduce die_addr() for die() with #GP fault address
Split __die() into __die_header() and __die_body(). This allows inserting extra information below the header line that initiates the bug report. Introduce a new function die_addr() that behaves like die(), but is for faults only and uses __die_header() and __die_body() so that a future commit can print extra information after the header line. [ bp: Comment the KASAN-specific usage of gp_addr. ] Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Konovalov <andreyknvl@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: kasan-dev@googlegroups.com Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org> Cc: Sean Christopherson <sean.j.christopherson@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20191218231150.12139-3-jannh@google.com
Diffstat (limited to 'arch/x86/include/asm/kdebug.h')
-rw-r--r--arch/x86/include/asm/kdebug.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kdebug.h b/arch/x86/include/asm/kdebug.h
index 75f1e35e7c15..247ab14c6309 100644
--- a/arch/x86/include/asm/kdebug.h
+++ b/arch/x86/include/asm/kdebug.h
@@ -33,6 +33,7 @@ enum show_regs_mode {
};
extern void die(const char *, struct pt_regs *,long);
+void die_addr(const char *str, struct pt_regs *regs, long err, long gp_addr);
extern int __must_check __die(const char *, struct pt_regs *, long);
extern void show_stack_regs(struct pt_regs *regs);
extern void __show_regs(struct pt_regs *regs, enum show_regs_mode);