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:	Sat, 3 Oct 2009 09:18:07 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Borislav Petkov <petkovbb@...glemail.com>,
	Borislav Petkov <borislav.petkov@....com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	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 <petkovbb@...glemail.com> wrote:

> On Fri, Oct 02, 2009 at 08:47:14PM +0200, Ingo Molnar wrote:
> > No, the locking was all that i meant. Using atomic_notifier would solve 
> > that. Make the default decoder low-prio, that way there's no need to do 
> > the callback save/restore sequence either.
> 
> Ok, how's that for starters, it has been only compile-tested and it
> looks straight-forward enough to me...

looks good at first sight. There's two further simplifications you could 
do:

> +int mce_register_decoder_notifier(struct notifier_block *nb);
> +int mce_unregister_decoder_notifier(struct notifier_block *nb);

expose the notifier list itself and dont create new register/unregister 
APIs. Doing:

	atomic_notifier_chain_register(&x86_mce_decoder_chain, nb);

straight from the EDAC code is clean enough.

plus:

> +static struct notifier_block amd_mce_dec_nb = {
> +	.notifier_call	= amd_decode_mce,
> +	.priority	= 100,
> +};
> +

it's better to set the default notifier to negative priority, and let 
the EDAC notifier(s) be at the default 0 priority. The 100 is arbitrary 
and ugly - that line can then be left out altogether.

	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