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: <20120117155125.GB13778@suse.de>
Date:	Tue, 17 Jan 2012 07:51:25 -0800
From:	Greg KH <gregkh@...e.de>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	Sergei Trofimovich <slyich@...il.com>,
	linux-kernel@...r.kernel.org, Kay Sievers <kay.sievers@...y.org>,
	Linux PM mailing list <linux-pm@...r.kernel.org>,
	Tony Luck <tony.luck@...el.com>,
	Borislav Petkov <bp@...64.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	prasad@...ux.vnet.ibm.com, Ming Lei <tom.leiming@...il.com>,
	Djalal Harouni <tixxdz@...ndz.org>,
	Borislav Petkov <borislav.petkov@....com>,
	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
	Andi Kleen <ak@...ux.intel.com>,
	gouders@...bocholt.fh-gelsenkirchen.de,
	Marcos Souza <marcos.mage@...il.com>, justinmattock@...il.com,
	Jeff Chua <jeff.chua.linux@...il.com>
Subject: Re: [PATCH] mce: fix warning messages about static struct mce_device

On Tue, Jan 17, 2012 at 09:38:43AM +0100, Ingo Molnar wrote:
> 
> * Greg KH <gregkh@...e.de> wrote:
> 
> > diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
> > index f35ce43..6aefb14 100644
> > --- a/arch/x86/include/asm/mce.h
> > +++ b/arch/x86/include/asm/mce.h
> > @@ -151,7 +151,7 @@ static inline void enable_p5_mce(void) {}
> >  
> >  void mce_setup(struct mce *m);
> >  void mce_log(struct mce *m);
> > -DECLARE_PER_CPU(struct device, mce_device);
> > +extern struct device *mce_device[CONFIG_NR_CPUS];
> 
> Minor nit, i don't think we have any other such [CONFIG_NR_CPUS] 
> pattern in the kernel.
> 
> This should be something like:
> 
>   DECLARE_PER_CPU(struct device *, mce_device);

That is what we used to have, but with just a static struct device.  We
really don't need this to be in the per-cpu area, a flat array should be
just fine, why can't we use the CONFIG_NR_CPUS value?  Should we use
something else?

> Or the pointer should be attached to the CPU info structure.

Ok, I have no objection to that, do you want me to make a patch doing
that, now that this is already in Linus's tree?

thanks,

greg k-h
--
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