2017-02-09 15:15:11 -08:00
|
|
|
# performanced
|
|
|
|
type performanced, domain, mlstrustedsubject;
|
|
|
|
type performanced_exec, exec_type, file_type;
|
|
|
|
|
2017-09-26 12:58:29 -07:00
|
|
|
# Needed to check for app permissions.
|
|
|
|
binder_use(performanced)
|
|
|
|
binder_call(performanced, system_server)
|
|
|
|
allow performanced permission_service:service_manager find;
|
|
|
|
|
2017-05-01 13:01:44 -07:00
|
|
|
pdx_server(performanced, performance_client)
|
2017-02-09 15:15:11 -08:00
|
|
|
|
|
|
|
# TODO: use file caps to obtain sys_nice instead of setuid / setgid.
|
|
|
|
allow performanced self:capability { setuid setgid sys_nice };
|
|
|
|
|
|
|
|
# Access /proc to validate we're only affecting threads in the same thread group.
|
|
|
|
# Performanced also shields unbound kernel threads. It scans every task in the
|
|
|
|
# root cpu set, but only affects the kernel threads.
|
2017-04-24 13:15:27 -07:00
|
|
|
r_dir_file(performanced, { appdomain bufferhubd kernel surfaceflinger })
|
2017-02-09 15:15:11 -08:00
|
|
|
dontaudit performanced domain:dir read;
|
2017-04-24 13:15:27 -07:00
|
|
|
allow performanced { appdomain bufferhubd kernel surfaceflinger }:process setsched;
|
2017-02-09 15:15:11 -08:00
|
|
|
|
|
|
|
# Access /dev/cpuset/cpuset.cpus
|
|
|
|
r_dir_file(performanced, cgroup)
|