From e763f3cc9bdb60baa2961045e14dfbc68534e93d Mon Sep 17 00:00:00 2001 From: Sina Hassani Date: Thu, 15 Jul 2021 21:55:57 -0700 Subject: [PATCH] Allow HAL to access sysfs. This is so that it can read fw metrics from sysfs and dump them through dumpsys. Test: Ran dumpsys and bugreport. Bug: 193841666 Change-Id: I08c08e35bad35d0eefc3f6ad218fb47e24051b0c --- edgetpu/hal_neuralnetworks_darwinn.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/edgetpu/hal_neuralnetworks_darwinn.te b/edgetpu/hal_neuralnetworks_darwinn.te index 1e65c1ff..b45a7059 100644 --- a/edgetpu/hal_neuralnetworks_darwinn.te +++ b/edgetpu/hal_neuralnetworks_darwinn.te @@ -39,3 +39,7 @@ add_service(hal_neuralnetworks_darwinn, edgetpu_nnapi_service); # Allow TPU NNAPI HAL to read the overcommit_memory info. allow hal_neuralnetworks_darwinn proc_overcommit_memory:file r_file_perms; + +# Allows the logging service to access /sys/class/edgetpu +allow hal_neuralnetworks_darwinn sysfs_edgetpu:dir r_dir_perms; +allow hal_neuralnetworks_darwinn sysfs_edgetpu:file r_file_perms;