public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Rolf Neugebauer <rolf.neugebauer@docker.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Jia Zhang <zhang.jia@linux.alibaba.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>, Ingo Molnar <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: x86/microcode/intel: Division by zero panic in 4.9.79 and 4.4.114
Date: Wed, 7 Feb 2018 19:12:54 +0100	[thread overview]
Message-ID: <20180207181254.GC8698@pd.tnic> (raw)
In-Reply-To: <CA+pO-2eiim-6E8VLAV2K3s=pqEv7QcV1f8znLeQWqZh=zKWVVQ@mail.gmail.com>

On Wed, Feb 07, 2018 at 04:31:59PM +0000, Rolf Neugebauer wrote:
>  arch/x86/kernel/cpu/microcode/core.c | 28 +++++++++++++++++++---------
>  1 file changed, 19 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/microcode/core.c
> b/arch/x86/kernel/cpu/microcode/core.c
> index b3e94ef461fd..1b3e0aa4c511 100644
> --- a/arch/x86/kernel/cpu/microcode/core.c
> +++ b/arch/x86/kernel/cpu/microcode/core.c
> @@ -44,7 +44,7 @@
> 
>  static struct microcode_ops    *microcode_ops;
> 
> -static bool dis_ucode_ldr;
> +static bool dis_ucode_ldr = true;
> 
>  static int __init disable_loader(char *str)
>  {
> @@ -81,6 +81,7 @@ struct cpu_info_ctx {
> 
>  static bool __init check_loader_disabled_bsp(void)
>  {
> +       u32 a, b, c, d;
>  #ifdef CONFIG_X86_32
>         const char *cmdline = (const char *)__pa_nodebug(boot_command_line);
>         const char *opt     = "dis_ucode_ldr";
> @@ -93,8 +94,23 @@ static bool __init check_loader_disabled_bsp(void)
>         bool *res = &dis_ucode_ldr;
>  #endif
> 
> -       if (cmdline_find_option_bool(cmdline, option))
> -               *res = true;
> +       if (!have_cpuid_p())
> +               return *res;

That might cause an issue, see 1f161f67a272c. Might wanna backport that
commit too, just in case, for those old CPUID-less geodes.

The rest looks ok.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

  reply	other threads:[~2018-02-07 18:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 14:09 x86/microcode/intel: Division by zero panic in 4.9.79 and 4.4.114 Rolf Neugebauer
2018-02-06 14:24 ` Borislav Petkov
2018-02-07 14:34   ` Greg KH
2018-02-07 16:31     ` Rolf Neugebauer
2018-02-07 18:12       ` Borislav Petkov [this message]
2018-02-08 13:55         ` Rolf Neugebauer
2018-02-08 14:53           ` Borislav Petkov
2018-02-08 16:25             ` Rolf Neugebauer
2018-02-08 16:39               ` Greg KH
2018-02-08 17:12                 ` [PATCH 1/2] x86/microcode/AMD: Do not load when running on a hypervisor Rolf Neugebauer
2018-02-08 17:12                   ` [PATCH 2/2] x86/microcode: Do the family check first Rolf Neugebauer
2018-02-08 17:25                     ` Greg KH
2018-02-08 18:26               ` x86/microcode/intel: Division by zero panic in 4.9.79 and 4.4.114 Borislav Petkov
2018-02-08 16:39       ` Greg KH

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=20180207181254.GC8698@pd.tnic \
    --to=bp@alien8.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rolf.neugebauer@docker.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=zhang.jia@linux.alibaba.com \
    /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