All of lore.kernel.org
 help / color / mirror / Atom feed
* 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
@ 2017-06-09 10:33 Hans de Goede
  2017-06-10 17:54 ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Hans de Goede @ 2017-06-09 10:33 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, vbox-dev

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
  2017-06-09 10:33 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Hans de Goede
@ 2017-06-10 17:54 ` Linus Torvalds
  2017-06-10 17:57   ` Linus Torvalds
  2017-06-12  8:16   ` Thomas Gleixner
  0 siblings, 2 replies; 8+ messages in thread
From: Linus Torvalds @ 2017-06-10 17:54 UTC (permalink / raw)
  To: Hans de Goede, Ingo Molnar
  Cc: Linux Kernel Mailing List, vbox-dev, the arch/x86 maintainers

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
  2017-06-10 17:54 ` Linus Torvalds
@ 2017-06-10 17:57   ` Linus Torvalds
  2017-06-12  8:16   ` Thomas Gleixner
  1 sibling, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2017-06-10 17:57 UTC (permalink / raw)
  To: Hans de Goede, Ingo Molnar
  Cc: Linux Kernel Mailing List, the arch/x86 maintainers

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
  2017-06-10 17:54 ` Linus Torvalds
  2017-06-10 17:57   ` Linus Torvalds
@ 2017-06-12  8:16   ` Thomas Gleixner
  2017-06-12 11:52     ` Peter Zijlstra
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Gleixner @ 2017-06-12  8:16 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Hans de Goede, Ingo Molnar, Linux Kernel Mailing List,
	the arch/x86 maintainers, Peter Zijlstra

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
  2017-06-12  8:16   ` Thomas Gleixner
@ 2017-06-12 11:52     ` Peter Zijlstra
  2017-06-12 16:51       ` Hans de Goede
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Zijlstra @ 2017-06-12 11:52 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Linus Torvalds, Hans de Goede, Ingo Molnar,
	Linux Kernel Mailing List, the arch/x86 maintainers

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,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
  2017-06-12 11:52     ` Peter Zijlstra
@ 2017-06-12 16:51       ` Hans de Goede
  2017-06-12 18:01         ` Peter Zijlstra
  0 siblings, 1 reply; 8+ messages in thread
From: Hans de Goede @ 2017-06-12 16:51 UTC (permalink / raw)
  To: Peter Zijlstra, Thomas Gleixner
  Cc: Linus Torvalds, Ingo Molnar, Linux Kernel Mailing List,
	the arch/x86 maintainers, Frank Mehnert, Michael Thayer

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,
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest
  2017-06-12 16:51       ` Hans de Goede
@ 2017-06-12 18:01         ` Peter Zijlstra
  2017-06-12 19:25           ` [tip:x86/urgent] x86/debug: Handle early WARN_ONs proper tip-bot for Peter Zijlstra
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Zijlstra @ 2017-06-12 18:01 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Thomas Gleixner, Linus Torvalds, Ingo Molnar,
	Linux Kernel Mailing List, the arch/x86 maintainers,
	Frank Mehnert, Michael Thayer

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,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [tip:x86/urgent] x86/debug: Handle early WARN_ONs proper
  2017-06-12 18:01         ` Peter Zijlstra
@ 2017-06-12 19:25           ` tip-bot for Peter Zijlstra
  0 siblings, 0 replies; 8+ messages in thread
From: tip-bot for Peter Zijlstra @ 2017-06-12 19:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: michael.thayer, peterz, hpa, hdegoede, frank.mehnert, mingo,
	torvalds, tglx, linux-kernel

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,

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-12 19:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-09 10:33 4.12 REGRESSION, 4.12 does not boot as VirtualBox guest Hans de Goede
2017-06-10 17:54 ` Linus Torvalds
2017-06-10 17:57   ` Linus Torvalds
2017-06-12  8:16   ` Thomas Gleixner
2017-06-12 11:52     ` Peter Zijlstra
2017-06-12 16:51       ` Hans de Goede
2017-06-12 18:01         ` Peter Zijlstra
2017-06-12 19:25           ` [tip:x86/urgent] x86/debug: Handle early WARN_ONs proper tip-bot for Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.