hal_neuralnetworks.te 1.2 KB

12345678910111213141516171819202122
  1. # HwBinder IPC from client to server, and callbacks
  2. binder_call(hal_neuralnetworks_client, hal_neuralnetworks_server)
  3. binder_call(hal_neuralnetworks_server, hal_neuralnetworks_client)
  4. hal_attribute_hwservice(hal_neuralnetworks, hal_neuralnetworks_hwservice)
  5. allow hal_neuralnetworks hidl_memory_hwservice:hwservice_manager find;
  6. allow hal_neuralnetworks hal_allocator:fd use;
  7. # Allow NN HAL service to use a client-provided fd residing in /data/data/.
  8. allow hal_neuralnetworks_server app_data_file:file { read write getattr map };
  9. allow hal_neuralnetworks_server privapp_data_file:file { read write getattr map };
  10. # Allow NN HAL service to use a client-provided fd residing in /data/local/tmp/.
  11. allow hal_neuralnetworks_server shell_data_file:file { read write getattr map };
  12. # Allow NN HAL client to check the ro.nnapi.extensions.deny_on_product
  13. # property to determine whether to deny NNAPI extensions use for apps
  14. # on product partition (apps in GSI are not allowed to use NNAPI extensions).
  15. get_prop(hal_neuralnetworks_client, nnapi_ext_deny_product_prop);
  16. # This property is only expected to be found in /product/build.prop,
  17. # allow to be set only by init.
  18. neverallow { domain -init } nnapi_ext_deny_product_prop:property_service set;