lkml.org 
[lkml]   [2022]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRegarding perfmon_capable()
Hello,

In perf event subsystem and related platform drivers registering a PMU,
should perfmon_capable() be used directly ? OR just wondering if instead
perf_allow_[cpu|kernel|tracepoint]() helpers should be used which also
checks for 'sysctl_perf_event_paranoid' ? Should not both capabilities
and 'sysctl_perf_event_paranoid' decide whether kernel/cpu/tracepoint
events will be captured for unprivileged users.

arch/parisc/kernel/perf.c: if (!perfmon_capable())
arch/powerpc/perf/imc-pmu.c: if (!perfmon_capable())
arch/powerpc/perf/imc-pmu.c: if (!perfmon_capable())
drivers/gpu/drm/i915/i915_perf.c: i915_perf_stream_paranoid && !perfmon_capable()) {
drivers/gpu/drm/i915/i915_perf.c: if (oa_freq_hz > i915_oa_max_sample_rate && !perfmon_capable()) {
drivers/gpu/drm/i915/i915_perf.c: if (i915_perf_stream_paranoid && !perfmon_capable()) {
drivers/gpu/drm/i915/i915_perf.c: if (i915_perf_stream_paranoid && !perfmon_capable()) {
drivers/media/rc/bpf-lirc.c: if (perfmon_capable())
drivers/perf/arm_spe_pmu.c: if (IS_ENABLED(CONFIG_PID_IN_CONTEXTIDR) && perfmon_capable())
drivers/perf/arm_spe_pmu.c: if (!perfmon_capable() &&

Although BPF might use perfmon_capabale() alone, because it was never
dependent on 'sysctl_perf_event_paranoid' ?

- Anshuman

\
 
 \ /
  Last update: 2022-07-01 07:08    [W:0.043 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site