summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-26 23:02:16 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-26 23:02:16 +0000
commit1a9f0b432f318afa97b59d72cf5098e398e7e761 (patch)
tree193c40116e6467326591c78f85e8b1c7311b7e20
parent39a59f8e21800e8a514522ac745f382f4f8a0032 (diff)
parent753ba3ea9cce24fe96b11cfe113ec3c4ee1e5bc6 (diff)
downloadcoral-sepolicy-android13-s2-release.tar.gz
Change-Id: I768c5e3e982debc5193e2422e47ff21041de1e5d
-rw-r--r--vendor/qcom/common/file.te4
-rw-r--r--vendor/qcom/common/genfs_contexts1
-rw-r--r--vendor/qcom/common/shell.te3
3 files changed, 7 insertions, 1 deletions
diff --git a/vendor/qcom/common/file.te b/vendor/qcom/common/file.te
index aa14724..4ba1c4a 100644
--- a/vendor/qcom/common/file.te
+++ b/vendor/qcom/common/file.te
@@ -200,6 +200,8 @@ type persist_time_file, file_type, vendor_persist_type;
# kgsl file type for sysfs access
type sysfs_kgsl, sysfs_type, fs_type;
type sysfs_kgsl_proc, sysfs_type, fs_type;
+type sysfs_kgsl_shell, sysfs_type, fs_type;
+
# kgsl snapshot file type for sysfs access
type sysfs_kgsl_snapshot, sysfs_type, fs_type;
@@ -338,4 +340,4 @@ type cnss_vendor_data_file, file_type, data_file_type, mlstrustedobject;
type modem_fdr_file, file_type, data_file_type;
# Warm reset
-type sysfs_poweroff, sysfs_type, fs_type; \ No newline at end of file
+type sysfs_poweroff, sysfs_type, fs_type;
diff --git a/vendor/qcom/common/genfs_contexts b/vendor/qcom/common/genfs_contexts
index 72cdede..29a9078 100644
--- a/vendor/qcom/common/genfs_contexts
+++ b/vendor/qcom/common/genfs_contexts
@@ -4,6 +4,7 @@ genfscon sysfs /kernel/boot_cdsp/boot
genfscon sysfs /kernel/boot_slpi/boot u:object_r:sysfs_msm_boot:s0
genfscon sysfs /class/uio u:object_r:sysfs_uio:s0
genfscon sysfs /devices/virtual/kgsl/kgsl/proc u:object_r:sysfs_kgsl_proc:s0
+genfscon sysfs /devices/platform/soc/2c00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/perfcounter u:object_r:sysfs_kgsl_shell:s0
genfscon sysfs /devices/platform/soc/0.qcom,rmtfs_sharedmem u:object_r:sysfs_rmtfs:s0
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp u:object_r:sysfs_msm_subsys:s0
genfscon sysfs /devices/platform/soc/soc:qcom,spss_utils u:object_r:sysfs_spss:s0
diff --git a/vendor/qcom/common/shell.te b/vendor/qcom/common/shell.te
new file mode 100644
index 0000000..cd0e4a4
--- /dev/null
+++ b/vendor/qcom/common/shell.te
@@ -0,0 +1,3 @@
+# allow shell users to control kgsl perfcounters
+allow shell sysfs_kgsl_shell:file rw_file_perms;
+allow shell sysfs_msm_subsys:dir r_dir_perms;