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: <20110426072350.GA30630@elte.hu>
Date:	Tue, 26 Apr 2011 09:23:50 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Andi Kleen <ak@...ux.intel.com>
Cc:	Vince Weaver <vweaver1@...s.utk.edu>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	linux-kernel@...r.kernel.org,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...il.com>,
	Lin Ming <ming.m.lin@...el.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH 1/1] perf tools: Add missing user space support for
 config1/config2


* Andi Kleen <ak@...ux.intel.com> wrote:

> > Now it has been disabled for unclear reasons.
> 
> Also unfortunately only partial. Previously you could at least write the MSR 
> from user space through /dev/cpu/*/msr, but now the kernel randomly rewrites 
> it if anyone else uses cache events.

Ugh, that's an unbelievable hack - if you hack an active PMU via writing to it 
via /dev/cpu/*/msr and it breaks you really get to keep the pieces. There's a 
reason why those devices are root only - it's as if you wrote to a filesystem 
that is already mounted!

If your user-space twiddling scripts go bad who knows what state the CPU gets 
into and you might be reporting bogus bugs. I think writing to those msrs 
directly should probably taint the kernel: i'll prepare a patch for that.

> It's very sad we have to go through this.

Not really, it took Peter 10 minutes to come up with an RFC patch to extend the 
cache events in a meaningful way - and that was actually more useful to users 
than all prior offcore patches combined. So the kernel already won from this 
episode.

We are not at all interested in hiding PMU functionality and keeping it 
unstructured, and just passing through some opaque raw ABI to user-space.

Thanks,

	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