summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2021-10-06 22:53:40 +0000
committerXin Li <delphij@google.com>2021-10-06 22:53:40 +0000
commit42bce458c65fd0e3f8f11562e6bb028ce15497cd (patch)
tree5c28ac85fb78cca715963662a3dcc54bee5d120e
parent4ecdde743558e6d56627bc43ad900402c305b47c (diff)
parent5f0871d433635afffd2375da3190e45f7e5ac46b (diff)
downloadpixel-sepolicy-android-s-v2-preview-1.tar.gz
Bug: 202323961 Merged-In: I75fef4babaa441067e0f9e9c537bfd0b98d09fb2 Change-Id: I6afaf632d41a9ab8bb80daae4847f3529f93038e
-rw-r--r--debugpolicy/device.te1
-rw-r--r--debugpolicy/file.te2
-rw-r--r--debugpolicy/file_contexts2
-rw-r--r--debugpolicy/genfs_contexts1
-rw-r--r--debugpolicy/init_dpm.te11
-rw-r--r--factory_boost/factory-post-boot.te6
-rw-r--r--factory_boost/file_contexts1
-rw-r--r--ramdump/common/file.te2
-rw-r--r--thermal/genfs_contexts1
9 files changed, 26 insertions, 1 deletions
diff --git a/debugpolicy/device.te b/debugpolicy/device.te
new file mode 100644
index 0000000..c774e3b
--- /dev/null
+++ b/debugpolicy/device.te
@@ -0,0 +1 @@
+type dpm_block_device, dev_type;
diff --git a/debugpolicy/file.te b/debugpolicy/file.te
new file mode 100644
index 0000000..604ba50
--- /dev/null
+++ b/debugpolicy/file.te
@@ -0,0 +1,2 @@
+# sysfs
+type sysfs_dpm_variant, sysfs_type, fs_type; # dpm variant
diff --git a/debugpolicy/file_contexts b/debugpolicy/file_contexts
new file mode 100644
index 0000000..0f2aaa6
--- /dev/null
+++ b/debugpolicy/file_contexts
@@ -0,0 +1,2 @@
+/dev/block/by-name/dpm_[ab] u:object_r:dpm_block_device:s0
+/vendor/bin/hw/init_dpm\.sh u:object_r:init_dpm_exec:s0
diff --git a/debugpolicy/genfs_contexts b/debugpolicy/genfs_contexts
new file mode 100644
index 0000000..d30809d
--- /dev/null
+++ b/debugpolicy/genfs_contexts
@@ -0,0 +1 @@
+genfscon sysfs /firmware/devicetree/base/dpm/variant u:object_r:sysfs_dpm_variant:s0
diff --git a/debugpolicy/init_dpm.te b/debugpolicy/init_dpm.te
new file mode 100644
index 0000000..b91c561
--- /dev/null
+++ b/debugpolicy/init_dpm.te
@@ -0,0 +1,11 @@
+type init_dpm, domain;
+type init_dpm_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(init_dpm)
+
+userdebug_or_eng(`
+allow init_dpm vendor_toolbox_exec:file execute_no_trans;
+allow init_dpm sysfs_dpm_variant:file r_file_perms;
+allow init_dpm block_device:dir search;
+allow init_dpm dpm_block_device:blk_file rw_file_perms;
+')
diff --git a/factory_boost/factory-post-boot.te b/factory_boost/factory-post-boot.te
new file mode 100644
index 0000000..103b6eb
--- /dev/null
+++ b/factory_boost/factory-post-boot.te
@@ -0,0 +1,6 @@
+# for factory_-prefixed targets only
+type factory-post-boot-sh, domain;
+type factory-post-boot-sh_exec, vendor_file_type, exec_type, file_type;
+init_daemon_domain(factory-post-boot-sh)
+
+allow factory-post-boot-sh vendor_toolbox_exec:file execute_no_trans;
diff --git a/factory_boost/file_contexts b/factory_boost/file_contexts
new file mode 100644
index 0000000..976e219
--- /dev/null
+++ b/factory_boost/file_contexts
@@ -0,0 +1 @@
+/vendor/bin/factory/factory_post_boot u:object_r:factory-post-boot-sh_exec:s0
diff --git a/ramdump/common/file.te b/ramdump/common/file.te
index 93b947f..78ad1db 100644
--- a/ramdump/common/file.te
+++ b/ramdump/common/file.te
@@ -1,3 +1,3 @@
type ramdump_vendor_data_file, file_type, data_file_type, mlstrustedobject;
type ramdump_vendor_mnt_file, file_type, data_file_type, mlstrustedobject;
-type ramdump_vendor_fs, fusefs_type, data_file_type, mlstrustedobject;
+type ramdump_vendor_fs, file_type, data_file_type, mlstrustedobject;
diff --git a/thermal/genfs_contexts b/thermal/genfs_contexts
index 83f2860..3000fa0 100644
--- a/thermal/genfs_contexts
+++ b/thermal/genfs_contexts
@@ -1,2 +1,3 @@
genfscon sysfs /devices/virtual/thermal u:object_r:sysfs_thermal:s0
genfscon sysfs /class/thermal u:object_r:sysfs_thermal:s0
+genfscon debugfs /gs101-thermal u:object_r:debugfs_thermal:s0