Merge "New ArmNN AIDL SELinux permissions and settings am: c319cdc9b7" into udc-d1-dev-plus-aosp

This commit is contained in:
Neil Fuller 2023-07-27 12:23:16 +00:00 committed by Android (Google) Code Review
commit 1dfdf49db5
6 changed files with 34 additions and 0 deletions

3
gpu/gpu.mk Normal file
View File

@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gpu/sepolicy
PRODUCT_PACKAGES += android.hardware.neuralnetworks-shim-service-armnn

View File

@ -0,0 +1 @@
/vendor/bin/hw/android\.hardware\.neuralnetworks-shim-service-armnn u:object_r:hal_neuralnetworks_armnn_exec:s0

View File

@ -0,0 +1,18 @@
type hal_neuralnetworks_armnn, domain;
hal_server_domain(hal_neuralnetworks_armnn, hal_neuralnetworks)
type hal_neuralnetworks_armnn_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_neuralnetworks_armnn)
add_service(hal_neuralnetworks_armnn, armnn_nnapi_service);
allow hal_neuralnetworks_armnn armnn_app_service:service_manager find;
get_prop(hal_neuralnetworks_armnn, hwservicemanager_prop)
allow isolated_app app_data_file:file setattr;
allow hal_neuralnetworks_armnn fwk_stats_service:service_manager find;
binder_call(hal_neuralnetworks_armnn, system_server);
binder_use(hal_neuralnetworks_armnn)

3
gpu/sepolicy/priv_app.te Normal file
View File

@ -0,0 +1,3 @@
allow priv_app armnn_app_service:service_manager find;
allow priv_app armnn_nnapi_service:service_manager find;

5
gpu/sepolicy/service.te Normal file
View File

@ -0,0 +1,5 @@
type armnn_nnapi_service, app_api_service, service_manager_type, isolated_compute_allowed_service;
type armnn_vendor_service, service_manager_type, hal_service_type;
type armnn_dba_service, app_api_service, service_manager_type, isolated_compute_allowed_service;
type armnn_app_service, service_manager_type;

View File

@ -0,0 +1,4 @@
com.google.armnn.IArmnnVendorService/default u:object_r:armnn_vendor_service:s0
android.hardware.neuralnetworks.IDevice/google-armnn u:object_r:armnn_nnapi_service:s0
com.google.armnn.IArmnnpAppService/default u:object_r:armnn_app_service:s0