OSDN Git Service

x86/doublefault/32: Rewrite the x86_32 #DF handler and unify with 64-bit
authorAndy Lutomirski <luto@kernel.org>
Thu, 21 Nov 2019 07:06:41 +0000 (23:06 -0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 26 Nov 2019 21:00:04 +0000 (22:00 +0100)
commit7d8d8cfdee9a7bd6f9682f253fa98efdd8048a9e
treee84496231e428d837eba299a378e5dafa31e1849
parentdc4e0021b00b5a4ecba56fae509217776592b0aa
x86/doublefault/32: Rewrite the x86_32 #DF handler and unify with 64-bit

The old x86_32 doublefault_fn() was old and crufty, and it did not
even try to recover.  do_double_fault() is much nicer.  Rewrite the
32-bit double fault code to sanitize CPU state and call
do_double_fault().  This is mostly an exercise i386 archaeology.

With this patch applied, 32-bit double faults get a real stack trace,
just like 64-bit double faults.

[ mingo: merged the patch to a later kernel base. ]

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/entry/entry_32.S
arch/x86/include/asm/traps.h
arch/x86/kernel/doublefault_32.c
arch/x86/kernel/traps.c