Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e5ac623a authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta
Browse files

perf: Satisfy the kernel's request to request PMU counters



The SELinux policy on Android doesn't provide the kernel-space
with CAP_SYS_ADMIN capability. The perf-core checks for this
capability before giving access to the callers to read the PMU
counters. Hence, when the kernel drivers try to gain access
to the PMU (via perf_event_create_kernel_counter()), it fails
with -EACCES.

To get past this, add another condition to check if the request
is coming from kernel-space or user-space. If kernel-space,
don't check for the capability any further and move on.

Change-Id: Ie2ddc6b619fa0d60d4752994ea0c9cedf5b96b5c
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
parent 333b4ccb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment