Bug 195961 - Linux 4.12 REGRESSION silently panics on early WARN_ONCE
Summary: Linux 4.12 REGRESSION silently panics on early WARN_ONCE
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-01 13:56 UTC by Frank Mehnert
Modified: 2017-06-21 08:32 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.12-rc1/-rc2/-rc3
Tree: Mainline
Regression: No


Attachments

Description Frank Mehnert 2017-06-01 13:56:03 UTC
When running a Linux 4.12 guest inside VirtualBox on an Intel Skylake host, the kernel warns about

  XSTATE_WARN_ON(paranoid_xstate_size != fpu_kernel_xstate_size);

This warning is triggered because the kernel uses the CPUID bits to determine various XSTATE-related features and determines the expected XSTATE size.

  fpu_kernel_xstate_size = 0x440
  paranoid_xstate_size   = 0x240

Please note that this bug report is NOT about this kernel warning:

Linux 4.11 prints a kernel warning and continues to boot.
Linux 4.12 just halts without showing any information. Guest stack:

VBoxDbg> k
RBP              Ret SS:RBP            Ret RIP          CS:RIP / Symbol [line]
ffffffff81e03cc8 0000:ffffffff81e03ce8 ffffffff8237c209 vmlinux!native_halt+5
ffffffff81e03ce8 0000:ffffffff81e03e00 ffffffff8235c167 vmlinux!early_fixup_exception+74
ffffffff81e03e00 0000:ffffffff81e03e20 ffffffff8236c3e9 vmlinux!early_idt_handler_common+47
ffffffff81e03e20 0000:ffffffff81e03e30 ffffffff8236d58b vmlinux!fpu__init_system+1e6
ffffffff81e03e30 0000:ffffffff81e03ea0 ffffffff82368821 vmlinux!early_cpu_init+102
ffffffff81e03ea0 0000:ffffffff81e03ee0 ffffffff8235cd01 vmlinux!setup_arch+bf
ffffffff81e03ee0 0000:ffffffff81e03ef0 ffffffff8235c2d4 vmlinux!start_kernel+c1
ffffffff81e03ef0 0000:ffffffff81e03f48 ffffffff8235c419 vmlinux!x86_64_start_reservations+29
ffffffff81e03f48 0000:0000000000000000 ffffffff810001bf vmlinux!x86_64_start_kernel+143
0000000000000000 0000:0000000000000000 0000000000000000 vmlinux!verify_cpu

Something is broken with the "early UD" handler.
Comment 1 Hans de Goede 2017-06-01 14:45:31 UTC
Adding REGRESSION to Summary to make clear that this is a regression.

This causes 4.12 to not boot as guest inside Virtual Box when running on any Sky Lake (and probably also Kaby Lake) host.

As Frank already mentioned this bug is not about the WARN_ON triggering / the oops, that happens with 4.11 too and is something for a separate bug report. This bug is about the regression from 4.11 -> 4.12-rc# where instead of getting an oops the kernel no longer boots at all.
Comment 2 Frank Mehnert 2017-06-21 08:32:15 UTC
Fixed in 4.12-rc6.

Note You need to log in before you can comment on or make changes to this bug.