8 Commits

Author SHA1 Message Date
Treehugger Robot
c5c4ae5c1f Merge "Allow hal_neuralnetworks_darwinn and dba service to read DMA buf." into main 2023-10-10 23:26:20 +00:00
qinyiyan
af16ce519d Allow hal_neuralnetworks_darwinn and dba service to read DMA buf.
AVC denials seen:
avc:  denied  { read } for  name="system" dev="tmpfs" ino=592 scontext=u:r:hal_neuralnetworks_darwinn:s0 tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file permissive=0

bug: 303526151
Test: forrest build
Change-Id: I42e714908df163df6a328f451202a93fc11caeee
2023-10-05 14:13:31 -07:00
Yu-Chi Cheng
7232d53128 Added SELinux rules for vendor.darwinn.runtime. properties.
This allows DarwiNN runtime components to access related system
properties, including the ones that control host DMA-BUF allocation.

Bug: 297432189
Test: verified camera to work on local device
Change-Id: I4b3f566417445a2a0ef6eae64d9b0ed7d20ff26c
2023-09-26 20:49:42 +00:00
qinyiyan
aaae6818d0 Enable RT threads by default for Edgetpu DBA HAL.
Bug:267379294
Test: forrest build.

Change-Id: I95d6c276bb29c8f24bbf4b672e64d78e2e073301
2023-05-11 20:43:01 +00:00
feiyuchen
0f1433b2c8 Allow EdgeTPU DBA service to access the edgetpu_app_service
EdgeTpu DBA service calls edgetpu_app_service's UserIsAuthorized API in order to know whether its clients are authorized to use priviledge features, see code: https://source.corp.google.com/android-internal/vendor/google/darwinn2/dba/service/edgetpu_device.cpp;l=73;rcl=1c57b54efe12cdb408cb21a992155a04d151e3ce

It looks like the SELinux rule is missing today. Though I'm not sure why DBA service doesn't crash today.


Bug: 237103652
Change-Id: I8c5da7413eb6f9efc527c9f9f1d1242f0cb4dea8
2023-03-24 18:31:33 +00:00
Yu-Chi Cheng
8e965d36a2 Added the hetero runtime system property SELinux rules.
Currently, there is a hetero runtime property that darwinn
and other hetero runtime project will use: the trace level
(vendor.google.silicon.max_trace_level).

This change allows edgetpu services and clients to be able to see
that property in order to change the trace level.

Bug: 272292650
Test: verified it to build but not tested on device yet since selinux
has not been enforced yet.

Change-Id: Id6d345b92d2e710b41ca58907ad443fc2667054a
2023-03-16 14:10:10 -07:00
feiyuchen
1fa64096e9 Add android property vendor.edgetpu.tflite_delegate.force_disable_io_coherency
because we need it for DarwinnDelegate to forcelly disable the cache coherency feature for debugging purpose. This sys prop should be readable by all Darwinn Delegate clients, but only modifiable by `adb root`.

Test: Verified that both camera app and camera HAL can read the flag. See pending CL cl/507001854 and android_flag_permission_test.md

Bug: 262420821
Change-Id: I0ae7e02f1d4805956a05afeb92f892cbac6d5213
2023-02-03 23:44:52 +00:00
Victor Barr
810349517a Add support for dba hal in common edgetpu packages
Previously supported in some cases. Now extend it to all common cases

Bug: 263394888
Test: Built and ran DBA Hal on Android Device
Change-Id: I9a5c6a6c8d8b6c23a7d86678ecae57a9f0bcdf7a
2023-01-17 18:04:45 +00:00