Add policy for USF low latency transport gralloc usage.

Bug: 183233052
Test: Verified regular and direct report sampling on Raven with shared
 memory transport enabled.
Test: See details in testing done comment in
 https://googleplex-android-review.git.corp.google.com/14144079 .
Change-Id: Ia852a4a9ca6e8eacb0fb465884d17f95445a6822
This commit is contained in:
Erik Staats 2021-04-09 12:58:12 -07:00
parent b4bab832f9
commit 1082e886c0
4 changed files with 25 additions and 0 deletions

View file

@ -41,6 +41,9 @@ allow hal_sensors_default fwk_stats_hwservice:hwservice_manager find;
# Allow access to the sysfs_aoc.
allow hal_sensors_default sysfs_aoc:dir search;
# Allow use of the USF low latency transport.
usf_low_latency_transport(hal_sensors_default)
#
# Suez type enforcements.
#

14
usf/te_macros Normal file
View file

@ -0,0 +1,14 @@
#
# USF SELinux type enforcement macros.
#
#
# usf_low_latency_transport(domain)
#
# Allows domain use of the USF low latency transport.
#
define(`usf_low_latency_transport', `
allow $1 hal_graphics_mapper_hwservice:hwservice_manager find;
hal_client_domain($1, hal_graphics_allocator)
')

View file

@ -11,3 +11,7 @@ allow chre sysfs_aoc_boottime:file r_file_perms;
# Allow CHRE to create thread to watch AOC's device
allow chre device:dir r_dir_perms;
# Allow CHRE to use the USF low latency transport
usf_low_latency_transport(chre)

View file

@ -22,3 +22,7 @@ binder_call(rlsservice, hal_camera_default)
# Allow access to always-on compute device node
allow rlsservice device:dir { read watch };
allow rlsservice aoc_device:chr_file rw_file_perms;
# Allow use of the USF low latency transport
usf_low_latency_transport(rlsservice)