summaryrefslogtreecommitdiff
path: root/sepolicy/edgetpu/edgetpu_logging.te
diff options
context:
space:
mode:
Diffstat (limited to 'sepolicy/edgetpu/edgetpu_logging.te')
-rw-r--r--sepolicy/edgetpu/edgetpu_logging.te15
1 files changed, 15 insertions, 0 deletions
diff --git a/sepolicy/edgetpu/edgetpu_logging.te b/sepolicy/edgetpu/edgetpu_logging.te
new file mode 100644
index 00000000..8c2f0dc7
--- /dev/null
+++ b/sepolicy/edgetpu/edgetpu_logging.te
@@ -0,0 +1,15 @@
+type edgetpu_logging, domain;
+type edgetpu_logging_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(edgetpu_logging)
+
+# The logging service accesses /dev/abrolhos
+allow edgetpu_logging edgetpu_device:chr_file rw_file_perms;
+
+# Allows the logging service to access /sys/class/edgetpu
+allow edgetpu_logging sysfs_edgetpu:dir search;
+allow edgetpu_logging sysfs_edgetpu:file rw_file_perms;
+
+# Allow TPU logging service to log to stats service. (metrics)
+allow edgetpu_logging fwk_stats_service:service_manager find;
+binder_call(edgetpu_logging, system_server);
+binder_use(edgetpu_logging)