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:	Thu, 11 Nov 2010 14:34:42 +0100
From:	Borislav Petkov <bp@...64.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Ben Gamari <bgamari@...il.com>,
	"acme@...radead.org" <acme@...radead.org>,
	"fweisbec@...il.com" <fweisbec@...il.com>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 03/20] x86, mce: Add persistent MCE event

On Thu, Nov 11, 2010 at 03:58:25AM -0500, Ingo Molnar wrote:
> > Yep, event enumeration will land in /sysfs eventually but in this case debugfs is 
> > used to export the buffers with the events recorded so far to the daemon which 
> > mmaps them. And I remember also being mentioned that debugfs will thus be always 
> > compiled in because of that.
> 
> The event ring-buffer can be mmap()-ed off the fd that sys_perf_event_open() gives.

This is what I did in the first version of the patchset...

> This is what all of tools/perf/ does - it uses debugfs only for even enumeration
> (which will move to sysfs).

but then PeterZ suggested I should use debugfs to export the buffers
and not teach sys_perf_event_open of persistent events. Which is also
the right thing to do (maybe not through debugfs) since we want to have
a single per-cpu buffer with all MCEs in there which even multiple
userspace tools can access. So the question is, how do I mmap() those
properly?

So we either

1) use the perf syscall and teach it about persistent events and it always
returns the same fd whenever a persistent event is requested over its attr
argument;

2) use debugfs (current approach);

3) enable the persistent event and stash its fd in some /sysfs member
which the RAS daemon reads out and mmaps. This last one actually sounds
pretty neat.

4) another idea which I'm missing.

So what do you guys think?

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