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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Jun 2012 01:28:57 +0200
From:	Borislav Petkov <bp@...64.org>
To:	"Yu, Fenghua" <fenghua.yu@...el.com>
Cc:	X86-ML <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Andreas Herrmann <andreas.herrmann3@....com>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/2] x86, microcode: Make reload interface per system

On Tue, Jun 19, 2012 at 11:10:14PM +0000, Yu, Fenghua wrote:
> >  static int __init microcode_init(void)
> >  {
> >  	struct cpuinfo_x86 *c = &cpu_data(0);
> > @@ -559,9 +568,17 @@ static int __init microcode_init(void)
> >  	if (error)
> >  		goto out_pdev;
> > 
> > +	error = sysfs_create_group(&cpu_subsys.dev_root->kobj,
> > +				   &cpu_root_microcode_group);
> > +
> > +	if (error) {
> > +		pr_err("Error creating microcode group!\n");
> > +		goto out_driver;
> > +	}
> > +
> >  	error = microcode_dev_init();
> >  	if (error)
> > -		goto out_driver;
> > +		goto out_ucode_group;
> > 
> If you put sysfs_create_group() after microcode_dev_init(),
> out_ucode_group is unnecessary and code is a bit simpler.
> Microcode_dev_init() doesn't rely on sysfs_create_group() and it's a
> NULL function any way.

I don't think microcode_dev_init() is a NULL function since it depends
on CONFIG_MICROCODE_OLD_INTERFACE and we have it on by default:

config MICROCODE_OLD_INTERFACE
        def_bool y
        depends on MICROCODE

which makes me wonder whether we still need that OLD INTERFACE.
Henrique, any thoughts here?

But you're right, reordering the registration could simplify the code.
I'll take a look at it tomorrow.

Thanks.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
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