blob: 1ef6cadffc8c1d648c2c9f2e51d5ac549a7a952c [file] [log] [blame]
Dan Cashman91d398d2017-09-26 12:58:29 -07001# HwBinder IPC from client to server, and callbacks
2binder_call(hal_neuralnetworks_client, hal_neuralnetworks_server)
3binder_call(hal_neuralnetworks_server, hal_neuralnetworks_client)
4
Steven Moreland9234e002018-06-06 09:30:18 -07005hal_attribute_hwservice(hal_neuralnetworks, hal_neuralnetworks_hwservice)
Dan Cashman91d398d2017-09-26 12:58:29 -07006allow hal_neuralnetworks hidl_memory_hwservice:hwservice_manager find;
7allow hal_neuralnetworks hal_allocator:fd use;
Michael Butler3ff7bf82018-12-07 17:24:24 -08008
9# Allow NN HAL service to use a client-provided fd residing in /data/data/.
10allow hal_neuralnetworks_server app_data_file:file { read write getattr map };
Miao Wang8c2f4ba2019-04-24 16:44:41 -070011allow hal_neuralnetworks_server privapp_data_file:file { read write getattr map };
Michael Butler3ff7bf82018-12-07 17:24:24 -080012
13# Allow NN HAL service to use a client-provided fd residing in /data/local/tmp/.
14allow hal_neuralnetworks_server shell_data_file:file { read write getattr map };
Przemyslaw Szczepaniak62a22ce2019-04-02 15:34:16 +010015
16# Allow NN HAL client to check the ro.nnapi.extensions.deny_on_product
17# property to determine whether to deny NNAPI extensions use for apps
18# on product partition (apps in GSI are not allowed to use NNAPI extensions).
19get_prop(hal_neuralnetworks_client, nnapi_ext_deny_product_prop);
20# This property is only expected to be found in /product/build.prop,
21# allow to be set only by init.
22neverallow { domain -init } nnapi_ext_deny_product_prop:property_service set;