aboutsummaryrefslogtreecommitdiff
path: root/sepolicy
diff options
context:
space:
mode:
Diffstat (limited to 'sepolicy')
-rw-r--r--sepolicy/file_contexts3
-rw-r--r--sepolicy/hal_neuralnetworks_hvx.te9
2 files changed, 12 insertions, 0 deletions
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 681e831..95926eb 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -21,6 +21,9 @@
/sys/devices/soc/leds-qpnp-[0-9]+/leds(/.*)? u:object_r:sysfs_leds:s0
/vendor/bin/hw/android\.hardware\.light@2\.0-service.zuk_8996 u:object_r:hal_light_default_exec:s0
+# Neural Networks HAL
+/(vendor|system/vendor)/bin/hw/android\.hardware\.neuralnetworks@1\.0-service-hvx u:object_r:hal_neuralnetworks_hvx_exec:s0
+
# persist
/dev/block/platform/soc/(624000\.ufshc|7464900\.sdhci)/by-name/persist u:object_r:persist_block_device:s0
/persist/rfs(/.*)? u:object_r:rfs_file:s0
diff --git a/sepolicy/hal_neuralnetworks_hvx.te b/sepolicy/hal_neuralnetworks_hvx.te
new file mode 100644
index 0000000..fdbd3f3
--- /dev/null
+++ b/sepolicy/hal_neuralnetworks_hvx.te
@@ -0,0 +1,9 @@
+type hal_neuralnetworks_hvx, domain;
+hal_server_domain(hal_neuralnetworks_hvx, hal_neuralnetworks)
+
+type hal_neuralnetworks_hvx_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(hal_neuralnetworks_hvx)
+
+allow hal_neuralnetworks_hvx ion_device:chr_file { read open ioctl };
+allow hal_neuralnetworks_hvx qdsp_device:chr_file { read open ioctl };
+