|
|
Log in / Subscribe / Register

Re: [PATCH 3/4] x86, mce: Add persistent MCE event

From:  Borislav Petkov <bp-AT-amd64.org>
To:  Steven Rostedt <rostedt-AT-goodmis.org>
Subject:  Re: [PATCH 3/4] x86, mce: Add persistent MCE event
Date:  Tue, 3 May 2011 17:42:15 +0200
Message-ID:  <20110503154215.GH20241@aftab>
Cc:  Joe Perches <joe-AT-perches.com>, Ingo Molnar <mingo-AT-elte.hu>, Peter Zijlstra <peterz-AT-infradead.org>, Arnaldo Carvalho de Melo <acme-AT-infradead.org>, Frederic Weisbecker <fweisbec-AT-gmail.com>, Tony Luck <tony.luck-AT-intel.com>, Mauro Carvalho Chehab <mchehab-AT-redhat.com>, EDAC devel <linux-edac-AT-vger.kernel.org>, LKML <linux-kernel-AT-vger.kernel.org>, "Petkov, Borislav" <Borislav.Petkov-AT-amd.com>
Archive‑link:  Article

On Tue, May 03, 2011 at 11:34:32AM -0400, Steven Rostedt wrote:
> On Tue, 2011-05-03 at 17:22 +0200, Borislav Petkov wrote:
> > On Tue, May 03, 2011 at 11:14:16AM -0400, Joe Perches wrote:
> > > On Tue, 2011-05-03 at 09:18 +0200, Borislav Petkov wrote:
> > > > On Tue, May 03, 2011 at 02:44:01AM -0400, Ingo Molnar wrote:
> > > > > * Borislav Petkov <bp@amd64.org> wrote:
> > > []
> > > > > > +static struct dentry *mce_add_event_debugfs(struct perf_event *event, int cpu)
> > > > > > +{
> > > > > > +	char buf[14];
> 
> There should be no harm in upping that number to 32. (I've seen much
> worse on stacks).
> 
> > > > > > +
> > > > > > +	sprintf(buf, "mce_record%d", cpu);
> 
> At least change this to:
> 
> 		snprintf(buf, 14, ....)

Yep, this is the only sane suggestion I've got, thanks.

Other than that, we shouldn't be concentrating too much on this since
we're moving to /sysfs anyway and there we have the per-CPU hierarchy
with /sys/devices/system/cpu/cpu%d...

> > I'll fix that when someone comes up with a x86 system that supports 10k+
> > CPUs with a single system image :).
> > 
> 
> Best to fix it now, to save the trouble of finding this bug for those
> that are maintaining this code long after we have retired or are dead ;)

Nah, I'll leave it in so that they can have a blast from the past and
can boast on the slashdot of the future or on ((LWN++)..)++ that they've
fixed the oldest bug in Linux when booting it on quantum x86 computers
and tried running their RAS daemon :-).

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632



to post comments


Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds