From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: Re: [Intel-gfx] [RFC] perf: Allow fine-grained PMU access control
Date: Fri, 23 Feb 2018 15:58:30 +0000 [thread overview]
Message-ID: <5e7d376d-5204-099c-8313-e5aae8adea91@linux.intel.com> (raw)
In-Reply-To: <1074f5d5-dab4-dd62-6894-38676721491d@linux.intel.com>
Hi,
On 19/01/2018 17:10, Tvrtko Ursulin wrote:
>
> Hi,
>
> On 19/01/2018 16:45, Peter Zijlstra wrote:
>> On Thu, Jan 18, 2018 at 06:40:07PM +0000, Tvrtko Ursulin wrote:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> 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.
>>
>> You've completely and utterly failed to explain why.
>
> On an abstract level, if there is a desire to decrease the security knob
> on one particular PMU provider, it is better to be able to do it just
> for the one, rather for the whole system.
>
> On a more concrete level, we have customers who want to look at certain
> i915 metrics, most probably engine utilization or queue depth, in order
> to make load-balancing decisions. (The two would be roughly analogous to
> CPU usage and load.)
>
> This data needs to be available to their userspaces dynamically and
> would be used to pick a best GPU engine (mostly analogous to a CPU core)
> to run a particular packet of work.
>
> It would be impossible to run their product as root, and while one
> option could be to write a proxy daemon which would allow unprivileged
> queries, it is also a significant complication which introduces a time
> shift problem on the PMU data as well.
>
> So my thinking was that a per-PMU paranoid control should not be a
> problematic concept in general. And my gut feeling anyway was that not
> all PMU providers are the same class data, security wise, which was
> another reason I thought per-PMU controls would be fine.
>
> There is one more way of thinking about it, and that is that the access
> control could even be extended to be per-event, and not just per-PMU.
> That would allow registered PMUs to let the core know which counters are
> potentially security sensitive, and which are not.
>
> I've sent another RFC along those lines some time ago, but afterwards
> I've changed my mind and thought the approach from this patch should be
> less controversial since it retains all control fully in the perf core
> and in the hands of sysadmins.
Any thoughts on this one? Is the approach acceptable?
Regards,
Tvrtko
prev parent reply other threads:[~2018-02-23 15:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 18:40 [RFC] perf: Allow fine-grained PMU access control Tvrtko Ursulin
2018-01-19 16:45 ` Peter Zijlstra
2018-01-19 17:10 ` [Intel-gfx] " Tvrtko Ursulin
2018-02-23 15:58 ` Tvrtko Ursulin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e7d376d-5204-099c-8313-e5aae8adea91@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tursulin@ursulin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox