Re: [RFC] perf: Allow fine-grained PMU access control
From: Peter Zijlstra
Date: Tue May 22 2018 - 04:11:52 EST
On Mon, May 21, 2018 at 10:25:49AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
>
> For situations where sysadmins might want to allow different level of
> of access control for different PMUs, we start creating per-PMU
> perf_event_paranoid controls in sysfs.
Could you explain how exactly this makes sense?
For example, how does it make sense for one PMU to reveal kernel data
while another PMU is not allowed.
Once you allow one PMU to do so, the secret is out.
So please explain, in excruciating detail, how you want to use this and
how exactly that makes sense from a security pov.
> These work in equivalent fashion as the existing perf_event_paranoid
> sysctl, which now becomes the parent control for each PMU.
>
> On PMU registration the global/parent value will be inherited by each PMU,
> as it will be propagated to all registered PMUs when the sysctl is
> updated.
>
> At any later point individual PMU access controls, located in
> <sysfs>/device/<pmu-name>/perf_event_paranoid, can be adjusted to achieve
> fine grained access control.
>