diff options
| author | John Hubbard <jhubbard@nvidia.com> | 2026-05-27 15:55:07 -0700 |
|---|---|---|
| committer | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2026-05-28 08:19:45 -0700 |
| commit | 6680bf0cb7261b7eb62a7226c6845c5c9ce5a009 (patch) | |
| tree | b643ddebafda190b4191f46440edbee91ff79f5d /tools/perf/scripts/python/stackcollapse.py | |
| parent | d32bf877c0c3ebc345b444cbe009b3f44f9f8073 (diff) | |
drm/xe: gate observation streams with perf_allow_cpu()
xe OA and EU-stall paths open-code a partial copy of the system-wide
perf CPU-event permission check:
if (xe_observation_paranoid && !perfmon_capable())
return -EACCES;
This open-coded check skips two things perf_allow_cpu() handles: the
graduated kernel.perf_event_paranoid policy that an administrator
may have tuned, and the security_perf_event_open() LSM hook.
Introduce xe_observation_paranoid_check() to wrap perf_allow_cpu(),
and convert the open-coded sites in xe_oa.c and xe_eu_stall.c. The
dev.xe.observation_paranoid sysctl still acts as an escape hatch
when cleared.
xe observation now consults kernel.perf_event_paranoid and the LSM
perf hook on every open. Sites that have already configured an LSM
perf policy or tuned the paranoid sysctl will see those settings
extend to xe.
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patch.msgid.link/20260527225507.2044027-3-ashutosh.dixit@intel.com
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
