Merge "Allow dmabuf heap access to graphics allocator"

This commit is contained in:
TreeHugger Robot 2023-01-10 01:52:35 +00:00 committed by Android (Google) Code Review
commit 029f002a34
6 changed files with 18 additions and 17 deletions

View file

@ -3,10 +3,6 @@ type sg_device, dev_type;
type vendor_toe_device, dev_type;
type lwis_device, dev_type;
type rls_device, dev_type;
type sensor_direct_heap_device, dmabuf_heap_device_type, dev_type;
type faceauth_heap_device, dmabuf_heap_device_type, dev_type;
type vframe_heap_device, dmabuf_heap_device_type, dev_type;
type vscaler_heap_device, dmabuf_heap_device_type, dev_type;
# Raw HID device
type hidraw_device, dev_type;

View file

@ -28,16 +28,7 @@
/vendor/lib(64)?/libgpudataproducer\.so u:object_r:same_process_hal_file:s0
# Devices
/dev/dma_heap/sensor_direct_heap u:object_r:sensor_direct_heap_device:s0
/dev/ttySAC0 u:object_r:tty_device:s0
/dev/dma_heap/faceauth_tpu-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/faimg-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/famodel-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/faprev-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/farawimg-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/vframe-secure u:object_r:dmabuf_system_secure_heap_device:s0
/dev/dma_heap/vscaler-secure u:object_r:vscaler_heap_device:s0
/dev/dma_heap/vstream-secure u:object_r:dmabuf_system_secure_heap_device:s0
/dev/bigwave u:object_r:video_device:s0
/dev/stmvl53l1_ranging u:object_r:rls_device:s0
/dev/watchdog0 u:object_r:watchdog_device:s0

View file

@ -1,4 +0,0 @@
# b/264489636
userdebug_or_eng(`
permissive hal_graphics_allocator_default;
')

5
vendor/device.te vendored
View file

@ -6,5 +6,10 @@ type logbuffer_device, dev_type;
type gxp_device, dev_type;
type fingerprint_device, dev_type;
# Dmabuf heaps
type sensor_direct_heap_device, dmabuf_heap_device_type, dev_type;
type faceauth_heap_device, dmabuf_heap_device_type, dev_type;
type video_secure_heap_device, dmabuf_heap_device_type, dev_type;
# SecureElement SPI device
type st54spi_device, dev_type;

View file

@ -136,6 +136,15 @@
/dev/lwis-votf u:object_r:lwis_device:s0
/dev/st54spi u:object_r:st54spi_device:s0
/dev/trusty-ipc-dev0 u:object_r:tee_device:s0
/dev/dma_heap/sensor_direct_heap u:object_r:sensor_direct_heap_device:s0
/dev/dma_heap/faceauth_tpu-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/faimg-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/famodel-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/faprev-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/farawimg-secure u:object_r:faceauth_heap_device:s0
/dev/dma_heap/vframe-secure u:object_r:video_secure_heap_device:s0
/dev/dma_heap/vscaler-secure u:object_r:video_secure_heap_device:s0
/dev/dma_heap/vstream-secure u:object_r:video_secure_heap_device:s0
# Data
/data/vendor/camera(/.*)? u:object_r:vendor_camera_data_file:s0

View file

@ -0,0 +1,4 @@
allow hal_graphics_allocator_default sensor_direct_heap_device:chr_file r_file_perms;
allow hal_graphics_allocator_default faceauth_heap_device:chr_file r_file_perms;
allow hal_graphics_allocator_default dmabuf_system_secure_heap_device:chr_file r_file_perms;
allow hal_graphics_allocator_default video_secure_heap_device:chr_file r_file_perms;