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] [day] [month] [year] [list]
Message-ID: <493994B35A117E4F832F97C4719C4C0401370C23C9@orsmsx505.amr.corp.intel.com>
Date:	Thu, 13 Oct 2011 09:11:38 -0700
From:	"Yu, Fenghua" <fenghua.yu@...el.com>
To:	Andi Kleen <andi@...stfloor.org>, "x86@...nel.org" <x86@...nel.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andi Kleen <ak@...ux.intel.com>,
	"jbeulich@...ell.com" <jbeulich@...ell.com>,
	"khali@...ux-fr.org" <khali@...ux-fr.org>,
	Guenter Roeck <guenter.roeck@...csson.com>,
	Jean Delvare <khali@...ux-fr.org>
Subject: RE: [PATCH 3/3] coretemp: Get microcode revision from cpu_data v3

> -----Original Message-----
> From: Andi Kleen [mailto:andi@...stfloor.org]
> Sent: Wednesday, October 12, 2011 5:47 PM
> To: x86@...nel.org
> Cc: linux-kernel@...r.kernel.org; Andi Kleen; jbeulich@...ell.com; Yu,
> Fenghua; khali@...ux-fr.org
> Subject: [PATCH 3/3] coretemp: Get microcode revision from cpu_data v3
> 
> From: Andi Kleen <ak@...ux.intel.com>
> 
> Now that the ucode revision is available in cpu_data remove
> the existing code in coretemp.c to query it manually. Read the ucode
> revision from cpu_data instead
> 
> v2: Fix misplaced variable init. Remove unused variables.
> v3: Port to latest tree
> Cc: jbeulich@...ell.com
> Cc: fenghua.yu@...el.com
> Cc: khali@...ux-fr.org
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
>  drivers/hwmon/coretemp.c |   28 ++++------------------------
>  1 files changed, 4 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
> index 9323837..ce18c04 100644
> --- a/drivers/hwmon/coretemp.c
> +++ b/drivers/hwmon/coretemp.c
> @@ -325,15 +325,6 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id,
> struct device *dev)
>  	return adjust_tjmax(c, id, dev);
>  }
> 
> -static void __devinit get_ucode_rev_on_cpu(void *edx)
> -{
> -	u32 eax;
> -
> -	wrmsr(MSR_IA32_UCODE_REV, 0, 0);
> -	sync_core();
> -	rdmsr(MSR_IA32_UCODE_REV, eax, *(u32 *)edx);
> -}
> -
>  static int create_name_attr(struct platform_data *pdata, struct device
> *dev)
>  {
>  	sysfs_attr_init(&pdata->name_attr.attr);
> @@ -380,27 +371,16 @@ exit_free:
>  static int __cpuinit chk_ucode_version(unsigned int cpu)
>  {
>  	struct cpuinfo_x86 *c = &cpu_data(cpu);
> -	int err;
> -	u32 edx;
> 
>  	/*
>  	 * Check if we have problem with errata AE18 of Core processors:
>  	 * Readings might stop update when processor visited too deep
> sleep,
>  	 * fixed for stepping D0 (6EC).
>  	 */
> -	if (c->x86_model == 0xe && c->x86_mask < 0xc) {
> -		/* check for microcode update */
> -		err = smp_call_function_single(cpu, get_ucode_rev_on_cpu,
> -					       &edx, 1);
> -		if (err) {
> -			pr_err("Cannot determine microcode revision of "
> -			       "CPU#%u (%d)!\n", cpu, err);
> -			return -ENODEV;
> -		} else if (edx < 0x39) {
> -			pr_err("Errata AE18 not fixed, update BIOS or "
> -			       "microcode of the CPU!\n");
> -			return -ENODEV;
> -		}
> +	if (c->x86_model == 0xe && c->x86_mask < 0xc && c->microcode <
> 0x39) {
> +		pr_err("Errata AE18 not fixed, update BIOS or "
> +		       "microcode of the CPU!\n");
> +		return -ENODEV;
>  	}
>  	return 0;
>  }
> --
> 1.7.4.4

Acked-by: Fenghua Yu <fenghua.yu@...el.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ