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:	Fri, 2 Oct 2009 15:39:54 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Borislav Petkov <borislav.petkov@....com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Borislav Petkov <petkovbb@...glemail.com>,
	Andi Kleen <andi@...stfloor.org>, x86@...nel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] EDAC: carve out AMD MCE decoding logic


* Borislav Petkov <borislav.petkov@....com> wrote:

> +static void (*orig_mce_callback)(struct mce *m);
>  
>  void amd_report_gart_errors(bool v)
>  {
> @@ -427,9 +428,25 @@ static int __init mce_amd_init(void)
>  	 * We can decode MCEs for Opteron and later CPUs:
>  	 */
>  	if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
> -	    (boot_cpu_data.x86 >= 0xf))
> +	    (boot_cpu_data.x86 >= 0xf)) {
> +		/* safe the default decode mce callback */
> +		orig_mce_callback = x86_mce_decode_callback;
> +
>  		x86_mce_decode_callback = amd_decode_mce;
> +	}
>  
>  	return 0;
>  }
>  early_initcall(mce_amd_init);
> +
> +#ifdef MODULE
> +static void __exit mce_amd_exit(void)
> +{
> +	x86_mce_decode_callback = orig_mce_callback;
> +}

I suspect this is fine currently because no two EDAC modules should be 
active at the same time. A followup cleanup patch would be nice 
nevertheless that uses a notifier chain here with proper 
register/unregister locking.

	Ingo
--
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