common: Allow power HAL to change configs
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 1 Jul 2020 07:36:56 +0000 (09:36 +0200)
committerJan Altensen <info@stricted.net>
Mon, 6 Jul 2020 13:03:19 +0000 (15:03 +0200)
Change-Id: I5b9707481fe77ba5fe7f93a037cfdde5335771f0

common/vendor/device.te
common/vendor/file_contexts
common/vendor/hal_power_default.te

index 24f5a5f38957b934138951eb5c64afc56f830263..c84e9697d0c2267fd754c3772abc085f08c1007d 100644 (file)
@@ -10,6 +10,7 @@ type sec_efs_block_device, dev_type;
 
 type bbd_device, dev_type;
 type bt_device, dev_type;
+type cpu_dma_device, dev_type;
 type drb_device, dev_type;
 type epic_device, dev_type;
 type fp_sensor_device, dev_type;
index 634654aee40cbbd2e4ff28e4c905e1d51b172954..5466df283541aceb81e7e151b1b4e70e9747e58c 100644 (file)
@@ -30,6 +30,9 @@
 # bluetooth
 /dev/ttySAC[0-9]                             u:object_r:bt_device:s0
 
+# cpu
+/dev/cpu_dma_latency                         u:object_r:cpu_dma_device:s0
+
 ### epic
 /dev/mode                                    u:object_r:epic_device:s0
 /dev/socket/epic                             u:object_r:epicd_socket:s0
index eb3def4043ee85b1b2c9f5662fe2a9ae3eb96fc0..7f7565036fb026739c0abc9c74853632f0e1c73d 100644 (file)
@@ -1,5 +1,11 @@
 # hal_power_default.te
 
+# /dev/cpu_dma_latency
+allow hal_power_default cpu_dma_device:file rw_file_perms;
+
+# /dev/stune/top-app/schedtune.boost
+allow hal_power_default cgroup:file rw_file_perms;
+
 # /sys/class/input/
 allow hal_power_default sysfs_input:dir r_dir_perms;
 
@@ -14,3 +20,6 @@ allow hal_power_default sysfs_sec_touchscreen:lnk_file r_file_perms;
 
 # /sys/class/sec/tsp/input/{cmd,enabled}
 allow hal_power_default sysfs_touchscreen_writable:file rw_file_perms;
+
+# /sys/devices/system/cpu/cpu[0-9]/cpufreq/scaling_max_freq
+allow hal_power_default sysfs_devices_system_cpu:file rw_file_perms;