2017-02-10 00:15:11 +01:00
|
|
|
# performanced
|
|
|
|
type performanced, domain, mlstrustedsubject;
|
|
|
|
type performanced_exec, exec_type, file_type;
|
|
|
|
|
2017-05-01 22:01:44 +02:00
|
|
|
pdx_server(performanced, performance_client)
|
2017-02-10 00:15:11 +01: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 22:15:27 +02:00
|
|
|
r_dir_file(performanced, { appdomain bufferhubd kernel surfaceflinger })
|
2017-02-10 00:15:11 +01:00
|
|
|
dontaudit performanced domain:dir read;
|
2017-04-24 22:15:27 +02:00
|
|
|
allow performanced { appdomain bufferhubd kernel surfaceflinger }:process setsched;
|
2017-02-10 00:15:11 +01:00
|
|
|
|
|
|
|
# Access /dev/cpuset/cpuset.cpus
|
|
|
|
r_dir_file(performanced, cgroup)
|