lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Aug 2023 20:51:44 +0800
From:   Qiuxu Zhuo <qiuxu.zhuo@...el.com>
To:     tglx@...utronix.de
Cc:     arjan@...ux.intel.com, ashok.raj@...el.com, bp@...en8.de,
        linux-kernel@...r.kernel.org, nik.borisov@...e.com, x86@...nel.org,
        qiuxu.zhuo@...el.com
Subject: Re: [patch V2 03/37] x86/microcode/intel: Move microcode functions out of cpu/intel.c

Hi Thomas,

> ...
> -#define get_totalsize(mc) \
> -	(((struct microcode_intel *)mc)->hdr.datasize ? \
> -	 ((struct microcode_intel *)mc)->hdr.totalsize : \
> -	 DEFAULT_UCODE_TOTALSIZE)
> +#define DEFAULT_UCODE_DATASIZE		(2000)
>  
> ...
> +
> +static inline unsigned int get_totalsize(struct microcode_header_intel *hdr)
> +{
> +	return hdr->datasize ? : DEFAULT_UCODE_TOTALSIZE;

I tested this patch series and observed that the inline code above failed
the late microcode loading with the error message:

    [  117.100299] microcode: Error: bad microcode data file size.

According to the original get_totalsize() macro, seems like it should be:

    return hdr->datasize ? hdr->totalsize : DEFAULT_UCODE_TOTALSIZE;

With this minor change, the late microcode loading was successful, and the
expected message was displayed:

    ...
    [  150.198654] microcode: Microcode revision: 0x80000400 -> 0x80000401

-Qiuxu

> +}
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ