Commit graph

14 commits

Author SHA1 Message Date
Jason Macnak
21021194c4 Add gpu_device access to hal_neuralnetworks
... as this is needed for the hal to access and map
gralloc buffers on devices such as Cuttlefish. Previously,
this sepolicy is added in device specific directories but
the Cuttlefish team is looking at centralizing the sepolicy.

Bug: b/161819018
Test: `atest CtsNNAPITestCases`
Test: `atest VtsHalNeuralnetworksV1_0TargetTest`
Change-Id: Ia5b2704e2cdeedfa19d160e546d811b7d1c21aa9
2022-05-12 21:01:45 +00:00
Ian Hua
91d153e9b5 Update sepolicy for adding nnapi_native namespace.
Test: mm
Bug: 201399117
Change-Id: I40a2431b6f5a54deae27fe68f503aff9b99e2793
2021-10-12 11:50:26 +01:00
Xusong Wang
c4e559e04f Allow NN HAL service to read files from apk data files
This allows NNAPI users to pass in model data from the asset folder.

Bug: 184880878
Test: nnapi demo app with model data from asset file
Test: NNAPI benchmark CTS
Change-Id: I79ded4e9f35eb15e1f9f0d91308840e8b318d218
2021-04-19 16:39:49 -07:00
Michael Butler
581fafffd3 Allow binder to send signals to hal_neuralnetworks_service
Bug: 170696939
Test: mma
Change-Id: Ic960f81854f5d9c913d09adcfba9782bc94c3c2b
2021-04-13 16:27:19 -07:00
Lev Proleev
e4414bf228 Add sepolicy for NNAPI AIDL HAL service
This is a shared part that all NN HAL users otherwise would have to
define themselves.

Bug: 172922059
Test: m
Test: VtsHalNeuralnetworksTest on master (locally)
Change-Id: I3616d0afbb115bc0feaed00488855646633da915
2021-01-20 19:34:06 +00:00
Przemysław Szczepaniak
94be98073d Allow neuralnetworks hal service to read files from /sdcard
Bug: 138457453
Test: tflite nnapi benchmark app against /sdcard file
Change-Id: I368629f9177141d59eb5862cd29dd65da68d3ad7
2020-04-28 08:08:48 +00:00
Xusong Wang
83db40bdc7 Configure sepolicy to allow NN HAL services to use gralloc buffers.
All NNAPI drivers are expected to be able to read BLOB mode AHWBs
allocated by the client.

Bug: 147677855
Bug: 149870344
Test: m
Test: NNT_static
Change-Id: I3e4f32d039e1f229a477eb9bca613c554cc35b93
2020-02-21 11:56:38 -08:00
Miao Wang
8c2f4babee Allow NNAPI HAL services access model files provided by privapp.
Bug: 131169221
Test: mm
Change-Id: I1004821bd30e2a0586b14178e352e885cabfc002
(cherry picked from commit aa568e1c79)
2019-04-24 21:15:45 -07:00
Przemyslaw Szczepaniak
62a22ce5d6 NNAPI property to disable extensions use on GSI/AOSP product partition.
Property is NNAPI client-readable and writeable only by init/build.prop.

Bug: 129666983
Bug: 120483623
Test: flashed crosshatch/Cts tests for NNAPI
Change-Id: Ic4c0f176440610a2c54c078863f3d5382323cc65
2019-04-02 20:23:40 +01:00
Michael Butler
3ff7bf86ce Allow NN HAL to mmap client-provided fd by default
Currently all NN services include this, so making it a default will
reduce NN service configuration.

Change-Id: I18531e57a7069076a208aefac4a545ba6c4379b0
Fixes: 120283437
Test: mma
Test: NeuralNetworksTest_static
Test: VtsHalNeuralnetworksV1_*TargetTest
2018-12-07 17:26:28 -08:00
Steven Moreland
9234e00daf hal_attribute_hwservice_client drop '_client'
Since this attribute just associates a hal_attribute
with a given hwservice in the standard way.

Bug: 80319537
Test: boot + sanity + test for denials
Change-Id: I545de165515387317e6920ce8f5e8c491f9ab24e
2018-06-06 09:30:18 -07:00
Steven Moreland
343e24a1be hal_attribute_hwservice_client += add_hwservice
For sanity, this makes 'hal_attribute_hwservice_client'
be associated with a specific hwservice thus making things
consistent.

After this change, only configstore, hal_allocator, and the
fwk_* services are inconsistent with all other HALs.

Bug: 80319537
Test: boot device, sanity tests, check for denials
Change-Id: Ibffc65c9567a429e07a3dc4dd41117738459dc2a
2018-06-06 09:25:52 -07:00
Steven Moreland
8fc7981885 Find hal_foo_hwservice -> you are hal_foo_client.
Before, it was possible to access a hwservice without declaring
that you were a client.

This introduces the following macro:
hal_attribute_hwservice_client(hal_foo, hal_foo_hwservice)

which makes sure the above implication holds using a neverallow rule.

Bug: 80319537
Test: boot + sanity
Change-Id: Iededae68f14f0f3bd412c1205aa3b650a54d55c6
2018-05-30 16:46:57 -07:00
Dan Cashman
91d398d802 Sync internal master and AOSP sepolicy.
Bug: 37916906
Test: Builds 'n' boots.
Change-Id: Ia1d86264446ebecc1ca79f32f11354921bc77668
Merged-In: I208ec6a864127a059fb389417a9c6b259d7474cb
2017-09-26 14:38:47 -07:00