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]
Message-ID: <06e6c0b1e2624096038925bce787e7e8f0bb356d.camel@intel.com>
Date:   Wed, 19 Oct 2022 04:03:03 +0000
From:   "Huang, Kai" <kai.huang@...el.com>
To:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "Raj, Ashok" <ashok.raj@...el.com>, "bp@...en8.de" <bp@...en8.de>
CC:     "thomas.lendacky@....com" <thomas.lendacky@....com>,
        "Luck, Tony" <tony.luck@...el.com>,
        "Van De Ven, Arjan" <arjan.van.de.ven@...el.com>,
        "Hansen, Dave" <dave.hansen@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Pan, Jacob jun" <jacob.jun.pan@...el.com>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH 09/13] x86/microcode: Add a generic mechanism to declare
 support for minrev

On Fri, 2022-10-14 at 13:09 -0700, Ashok Raj wrote:
> @@ -606,6 +606,7 @@ static ssize_t reload_store(struct device *dev,
>  	enum ucode_state tmp_ret = UCODE_OK;
>  	int bsp = boot_cpu_data.cpu_index;
>  	unsigned long val;
> +	int minrev;
>  	ssize_t ret = 0;
>  
>  	ret = kstrtoul(buf, 0, &val);
> @@ -621,8 +622,14 @@ static ssize_t reload_store(struct device *dev,
>  	if (ret)
>  		goto put;
>  
> -	pr_err("Attempting late microcode loading - it is dangerous and taints the kernel.\n");
> -	pr_err("You should switch to early loading, if possible.\n");
> +	if (microcode_ops->check_minrev())
> +		minrev = microcode_ops->check_minrev();
> +
> +	if (!minrev) {
> +		pr_err("Attempting late microcode loading - it is dangerous and taints the kernel.\n");
> +		pr_err("You should switch to early loading, if possible.\n");
> +	}
> +

Hi Ashok,

IIUC a variable in stack isn't initialized to 0 automatically.  So looks if
check_minrev() callback is NULL, you will get an uninitialized 'minrev' in the
above if() statement check.

-- 
Thanks,
-Kai


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ