Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1662264 > unrolled thread
| Started by | Hans de Goede <hdegoede@redhat.com> |
|---|---|
| First post | 2017-06-09 12:40 +0200 |
| Last post | 2017-06-12 21:30 +0200 |
| Articles | 8 — 5 participants |
Back to article view | Back to linux.kernel
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
| From | Hans de Goede <hdegoede@redhat.com> |
|---|---|
| Date | 2017-06-09 12:40 +0200 |
| Subject | 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest |
| Message-ID | <tQpuG-nf-1@gated-at.bofh.it> |
Hi Linus, Sorry for escalating this right up to you, but this issue does not seem to be getting any attention and I'm not sure which subsys maintainer to poke about this. The problem is that the 4.12-rc# kernels fail to boot on VirtualBox guests hosted on any machine with a Sky Lake (and probably also a Kaby Lake) CPU, for details see: https://bugzilla.kernel.org/show_bug.cgi?id=195961 Regards, Hans
[toc] | [next] | [standalone]
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Date | 2017-06-10 20:00 +0200 |
| Message-ID | <tQSQ1-1Ye-1@gated-at.bofh.it> |
| In reply to | #1662264 |
On Fri, Jun 9, 2017 at 3:33 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>
> Sorry for escalating this right up to you, but this issue
> does not seem to be getting any attention and I'm not sure
> which subsys maintainer to poke about this.
Looks like x86. Added people.
> The problem is that the 4.12-rc# kernels fail to boot on
> VirtualBox guests hosted on any machine with a Sky Lake
> (and probably also a Kaby Lake) CPU, for details see:
>
> https://bugzilla.kernel.org/show_bug.cgi?id=195961
It would probably help enormously if somebody who saw this did a
bisection. If nothing else, we might have the option to just revert
until the issue is figured out.
Linus
[toc] | [prev] | [next] | [standalone]
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Date | 2017-06-10 20:00 +0200 |
| Message-ID | <tQSQ1-1Ye-5@gated-at.bofh.it> |
| In reply to | #1662988 |
Oh, and Hans - please don't add closed mailing lists when you cc other
people who aren't on the mailing list.
If the vbox-dev mailing list isn't interested in my emails, I'm not
interested in seeing them added to the thread either.
Just say no to closed mailing lists.
Linus
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2017-06-12 10:20 +0200 |
| Message-ID | <tRsJP-86G-9@gated-at.bofh.it> |
| In reply to | #1662988 |
On Sat, 10 Jun 2017, Linus Torvalds wrote: > On Fri, Jun 9, 2017 at 3:33 AM, Hans de Goede <hdegoede@redhat.com> wrote: > > > > Sorry for escalating this right up to you, but this issue > > does not seem to be getting any attention and I'm not sure > > which subsys maintainer to poke about this. > > Looks like x86. Added people. > > > The problem is that the 4.12-rc# kernels fail to boot on > > VirtualBox guests hosted on any machine with a Sky Lake > > (and probably also a Kaby Lake) CPU, for details see: > > > > https://bugzilla.kernel.org/show_bug.cgi?id=195961 Looks like the WARN/BUG rework. Peter???? Thanks, tglx
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2017-06-12 14:00 +0200 |
| Message-ID | <tRwaK-1Dv-13@gated-at.bofh.it> |
| In reply to | #1663306 |
On Mon, Jun 12, 2017 at 10:16:53AM +0200, Thomas Gleixner wrote:
> On Sat, 10 Jun 2017, Linus Torvalds wrote:
>
> > On Fri, Jun 9, 2017 at 3:33 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> > >
> > > Sorry for escalating this right up to you, but this issue
> > > does not seem to be getting any attention and I'm not sure
> > > which subsys maintainer to poke about this.
> >
> > Looks like x86. Added people.
> >
> > > The problem is that the 4.12-rc# kernels fail to boot on
> > > VirtualBox guests hosted on any machine with a Sky Lake
> > > (and probably also a Kaby Lake) CPU, for details see:
> > >
> > > https://bugzilla.kernel.org/show_bug.cgi?id=195961
>
> Looks like the WARN/BUG rework. Peter????
I wasn't aware we'd call WARN _that_ early. Does something like so make
it work?
---
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(-)
diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h
index b8ad261d11dc..c66d19e3c23e 100644
--- 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);
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 3995d3a777d4..bf54309b85da 100644
--- 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;
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 35ea061010a1..0ea8afcb929c 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -162,6 +162,9 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr)
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,
[toc] | [prev] | [next] | [standalone]
| From | Hans de Goede <hdegoede@redhat.com> |
|---|---|
| Date | 2017-06-12 19:00 +0200 |
| Message-ID | <tRAR4-4Dh-29@gated-at.bofh.it> |
| In reply to | #1663447 |
Hi,
On 12-06-17 13:52, Peter Zijlstra wrote:
> On Mon, Jun 12, 2017 at 10:16:53AM +0200, Thomas Gleixner wrote:
>> On Sat, 10 Jun 2017, Linus Torvalds wrote:
>>
>>> On Fri, Jun 9, 2017 at 3:33 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>>>>
>>>> Sorry for escalating this right up to you, but this issue
>>>> does not seem to be getting any attention and I'm not sure
>>>> which subsys maintainer to poke about this.
>>>
>>> Looks like x86. Added people.
>>>
>>>> The problem is that the 4.12-rc# kernels fail to boot on
>>>> VirtualBox guests hosted on any machine with a Sky Lake
>>>> (and probably also a Kaby Lake) CPU, for details see:
>>>>
>>>> https://bugzilla.kernel.org/show_bug.cgi?id=195961
>>
>> Looks like the WARN/BUG rework. Peter????
>
> I wasn't aware we'd call WARN _that_ early. Does something like so make
> it work?
Yes it does, with this patch the oops is back (unrelated problem) and
the kernel boots again :)
You can add my:
Tested-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
>
> ---
> 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(-)
>
> diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h
> index b8ad261d11dc..c66d19e3c23e 100644
> --- 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);
>
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index 3995d3a777d4..bf54309b85da 100644
> --- 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;
> diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
> index 35ea061010a1..0ea8afcb929c 100644
> --- a/arch/x86/mm/extable.c
> +++ b/arch/x86/mm/extable.c
> @@ -162,6 +162,9 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr)
> 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,
>
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2017-06-12 20:10 +0200 |
| Message-ID | <tRBWO-5Ex-35@gated-at.bofh.it> |
| In reply to | #1663987 |
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,
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Peter Zijlstra <tipbot@zytor.com> |
|---|---|
| Date | 2017-06-12 21:30 +0200 |
| Subject | [tip:x86/urgent] x86/debug: Handle early WARN_ONs proper |
| Message-ID | <tRDce-6lZ-7@gated-at.bofh.it> |
| In reply to | #1664145 |
Commit-ID: 8a524f803a3e0290cdba6d373361b2cef9752934
Gitweb: http://git.kernel.org/tip/8a524f803a3e0290cdba6d373361b2cef9752934
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Mon, 12 Jun 2017 13:52:46 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 12 Jun 2017 21:17:48 +0200
x86/debug: Handle early WARN_ONs proper
Hans managed to trigger a WARN very early in the boot which killed his
(Virtual) box.
The reason is that the recent rework of WARN() to use UD0 forgot to add the
fixup_bug() call to early_fixup_exception(). As a result the kernel does
not handle the WARN_ON injected UD0 exception and panics.
Add the missing fixup call, so early UD's injected by WARN() get handled.
Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0")
Reported-and-tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Frank Mehnert <frank.mehnert@oracle.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Michael Thayer <michael.thayer@oracle.com>
Link: http://lkml.kernel.org/r/20170612180108.w4vgu2ckucmllf3a@hirez.programming.kicks-ass.net
---
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(-)
diff --git a/arch/x86/include/asm/extable.h b/arch/x86/include/asm/extable.h
index b8ad261..c66d19e 100644
--- 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);
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 3995d3a..bf54309 100644
--- 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;
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 35ea061..0ea8afc 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -162,6 +162,9 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr)
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,
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web