Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1664145

Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
Date 2017-06-12 20:10 +0200
Message-ID <tRBWO-5Ex-35@gated-at.bofh.it> (permalink)
References <tQpuG-nf-1@gated-at.bofh.it> <tQSQ1-1Ye-1@gated-at.bofh.it> <tRsJP-86G-9@gated-at.bofh.it> <tRwaK-1Dv-13@gated-at.bofh.it> <tRAR4-4Dh-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jun 12, 2017 at 06:51:17PM +0200, Hans de Goede wrote:
> Yes it does, with this patch the oops is back (unrelated problem) and
> the kernel boots again :)

Cheers! Full patch below.

---
Subject: Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
From: Peter Zijlstra <peterz@infradead.org>
Date: Mon, 12 Jun 2017 13:52:46 +0200

Hans managed to trigger a WARN very early in the boot which killed his
(Virtual) box. Turns out we need to also consider fixup_bug() in
early_fixup_exception().

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0")
Reported-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/include/asm/extable.h |    1 +
 arch/x86/kernel/traps.c        |    2 +-
 arch/x86/mm/extable.c          |    3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

--- a/arch/x86/include/asm/extable.h
+++ b/arch/x86/include/asm/extable.h
@@ -29,6 +29,7 @@ struct pt_regs;
 	} while (0)
 
 extern int fixup_exception(struct pt_regs *regs, int trapnr);
+extern int fixup_bug(struct pt_regs *regs, int trapnr);
 extern bool ex_has_fault_handler(unsigned long ip);
 extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
 
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -182,7 +182,7 @@ int is_valid_bugaddr(unsigned long addr)
 	return ud == INSN_UD0 || ud == INSN_UD2;
 }
 
-static int fixup_bug(struct pt_regs *regs, int trapnr)
+int fixup_bug(struct pt_regs *regs, int trapnr)
 {
 	if (trapnr != X86_TRAP_UD)
 		return 0;
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -162,6 +162,9 @@ void __init early_fixup_exception(struct
 	if (fixup_exception(regs, trapnr))
 		return;
 
+	if (fixup_bug(regs, trapnr))
+		return;
+
 fail:
 	early_printk("PANIC: early exception 0x%02x IP %lx:%lx error %lx cr2 0x%lx\n",
 		     (unsigned)trapnr, (unsigned long)regs->cs, regs->ip,

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Hans de Goede <hdegoede@redhat.com> - 2017-06-09 12:40 +0200
  Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-10 20:00 +0200
    Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-10 20:00 +0200
    Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Thomas Gleixner <tglx@linutronix.de> - 2017-06-12 10:20 +0200
      Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Peter Zijlstra <peterz@infradead.org> - 2017-06-12 14:00 +0200
        Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Hans de Goede <hdegoede@redhat.com> - 2017-06-12 19:00 +0200
          Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Peter Zijlstra <peterz@infradead.org> - 2017-06-12 20:10 +0200
            [tip:x86/urgent] x86/debug: Handle early WARN_ONs proper tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2017-06-12 21:30 +0200

csiph-web