blob: c1307a4ab652ffc625d56d779141202e38d6541d [file] [log] [blame]
LuK133789287452018-01-11 12:31:01 +02001type perfd, domain;
2type perfd_exec, exec_type, vendor_file_type, file_type;
3
4init_daemon_domain(perfd)
5
Michael Bestas3ef5cf82018-05-18 23:21:41 +03006allow perfd self:capability { fsetid kill };
LuK1337443c0d82018-02-28 09:58:11 +00007
LuK133789287452018-01-11 12:31:01 +02008allow perfd {
9 sysfs_devices_system_cpu
10 sysfs_cpu_online
11 sysfs_scsi_host
12 proc
13 sysfs
14}:file rw_file_perms;
15
16# Allow access to devfreq sysfs entry
17r_dir_file(perfd, sysfs_devfreq)
18allow perfd sysfs_devfreq:file write;
19
20# Allow access to msm_perf sysfs entry
21r_dir_file(perfd, sysfs_msm_perf)
22allow perfd sysfs_msm_perf:file write;
23
24# Allow access to msm_power sysfs entry
25r_dir_file(perfd, sysfs_msm_power)
26allow perfd sysfs_msm_power:file write;
27
28# Allow access to lib sysfs entry
29allow perfd sysfs_lib:file w_file_perms;
30
31# Allow access to kgsl sysfs entry
32r_dir_file(perfd, sysfs_kgsl)
Michael Bestasc51e1272018-03-22 18:29:47 +020033allow perfd sysfs_kgsl:file write;
LuK133789287452018-01-11 12:31:01 +020034
LuK1337443c0d82018-02-28 09:58:11 +000035# Allow access to thermal sysfs entry
36allow perfd sysfs_thermal:dir search;
37allow perfd sysfs_thermal:file w_file_perms;
38
LuK133789287452018-01-11 12:31:01 +020039# mpctl socket
Michael Bestas55286ff2016-12-04 21:05:56 +020040allow perfd mpctl_socket:dir rw_dir_perms;
41allow perfd mpctl_socket:sock_file create_file_perms;
LuK133789287452018-01-11 12:31:01 +020042
43# default_values file
44allow perfd mpctl_data_file:dir rw_dir_perms;
45allow perfd mpctl_data_file:file create_file_perms;
46
47# Thermal lib access
48unix_socket_connect(perfd, thermal, thermal-engine)
49
Matt Wagantall731dac52015-11-24 12:11:11 -080050# Allow perfd to check for existence of other processes
51allow perfd domain:process signull;
52
LuK133789287452018-01-11 12:31:01 +020053# Allow perfd to set properties
54set_prop(perfd, freq_prop)
55
56allow perfd cgroup:file r_file_perms;
57allow perfd sysfs:dir r_dir_perms;
LuK1337443c0d82018-02-28 09:58:11 +000058
59r_dir_file(perfd, hal_power_default)