public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Mike Pagano <mpagano@gentoo.org>,
	dave.hansen@linux.intel.com, x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Pawan Kumar Gupta <pawan.kumar.gupta@intel.com>
Subject: Re: Skylake early panic after GDS mark
Date: Wed, 11 Oct 2023 09:45:57 -0700	[thread overview]
Message-ID: <a462ca9a-4110-45fe-aafb-9ef0dde63fec@intel.com> (raw)
In-Reply-To: <e1d338c8-643b-45e3-978c-1a42772960c9@gentoo.org>

... adding some mailing lists

On 10/11/23 08:48, Mike Pagano wrote:
> Hello, Dave,
> 
> I get a very early kernel panic with commit:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/x86/kernel/cpu/common.c?id=c9f4c45c8ec3f07f4f083f9750032a1ec3eab6b2
> 
> I reverted this and the system boots
> 
> $ dmesg | grep -i microcode
> [    0.000000] microcode: updated early: 0xc2 -> 0xf2, date = 2023-01-02
> [    0.528415] microcode: Microcode Update Driver: v2.2.

You've probably got a bug in your init binary.  The instruction that
puked shows up as:

	vmovd  xmm2,esi

... and it's in userspace.  You don't have a microcode mitigation for
GDS, so you're probably set to use GDS_MITIGATION_FORCE, which means the
kernel is disabling AVX:

>         /* No microcode */
>         if (!(x86_read_arch_cap_msr() & ARCH_CAP_GDS_CTRL)) {
>                 if (gds_mitigation == GDS_MITIGATION_FORCE) {
>                         /*
>                          * This only needs to be done on the boot CPU so do it
>                          * here rather than in update_gds_msr()
>                          */
>                         setup_clear_cpu_cap(X86_FEATURE_AVX);
>                         pr_warn("Microcode update needed! Disabling AVX as mitigation.\n");
>                 } else {
>                         gds_mitigation = GDS_MITIGATION_UCODE_NEEDED;
>                 }
>                 goto out;
>         }

One, you should file a bug on your init process since it's probably not
doing AVX enumeration properly.  It probably needs to have a fallback
path for when the CPU doesn't support AVX.

Second, you can work around this with:

	gather_data_sampling=off

That's not great because you'll still be exposed to the vulnerability.
But you can at least boot.

           reply	other threads:[~2023-10-11 16:46 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <e1d338c8-643b-45e3-978c-1a42772960c9@gentoo.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a462ca9a-4110-45fe-aafb-9ef0dde63fec@intel.com \
    --to=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpagano@gentoo.org \
    --cc=pawan.kumar.gupta@intel.com \
    --cc=x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox