public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
	mingo@redhat.com, tglx@linutronix.de,
	Srinivas REDDY Eeda <srinivas.eeda@oracle.com>,
	hpa@zytor.com
Subject: Re: [PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf
Date: Mon, 18 Jun 2018 21:56:19 +0200	[thread overview]
Message-ID: <20180618195619.GH24921@zn.tnic> (raw)
In-Reply-To: <7d20be40-4c15-4e15-a4d0-cd2efda6d701@default>

On Mon, Jun 04, 2018 at 08:16:51AM +0000, Zhenzhong Duan wrote:
> Intel spec says: 'The processor flags in the 48-byte header and the
> processor flags field associated with the extended processor signature
> structures may have multiple bits set.'
> 
> Make sure processor flags of the new microcode intersect with current
> cpu's. Comparing with old microcode's pf can't guarantee this.
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
> ---
>  arch/x86/kernel/cpu/microcode/intel.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
> index 461e315..54f4014 100644
> --- a/arch/x86/kernel/cpu/microcode/intel.c
> +++ b/arch/x86/kernel/cpu/microcode/intel.c
> @@ -371,12 +371,10 @@ static int microcode_sanity_check(void *mc, int print_err)
>  				goto next;
>  
>  		} else {
> -			struct microcode_header_intel *phdr = &patch->hdr;
> -
>  			if (!has_newer_microcode(data,
> -						 phdr->sig,
> -						 phdr->pf,
> -						 phdr->rev))
> +						 uci->cpu_sig.sig,
> +						 uci->cpu_sig.pf,
> +						 patch->hdr.rev))
>  				goto next;
>  		}
>  
> -- 

So I'm scratching my head over this and have no clue what you're trying
to achieve. Is this a fix for a bug you're seeing or what? You'd need to
be a lot more verbose when explaining what this patch is trying to do...

Thx.

-- 
Regards/Gruss,
    Boris.

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

  reply	other threads:[~2018-06-18 19:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04  8:16 [PATCH] x86/microcode/intel: Ensure new microcode processor flags match with cpu's pf Zhenzhong Duan
2018-06-18 19:56 ` Borislav Petkov [this message]
2018-06-19  4:49   ` Zhenzhong Duan
2018-06-19  9:12     ` Borislav Petkov
2018-06-19  9:24       ` Zhenzhong Duan
2018-06-19  9:35         ` Borislav Petkov

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=20180618195619.GH24921@zn.tnic \
    --to=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=srinivas.eeda@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=zhenzhong.duan@oracle.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