platform_system_sepolicy/public/bufferhubd.te
Jiwen 'Steve' Cai eeb0d38037 Allow fd access between mediacodec and bufferhubd
bufferhubd should be able to use sync fence fd from mediacodec; and
mediacodec should be able to use a gralloc buffer fd from the bufferhubd.

Bug: 32213311
Test: Ran exoplayer_demo and verify mediacodec can plumb buffer through
bufferhub.

Change-Id: Id175827c56c33890ecce33865b0b1167d872fc56
2017-03-15 15:56:27 -07:00

18 lines
619 B
Text

# bufferhubd
type bufferhubd, domain, mlstrustedsubject;
type bufferhubd_exec, exec_type, file_type;
pdx_server(bufferhubd)
use_pdx(bufferhubd, performanced)
# Access the GPU.
allow bufferhubd gpu_device:chr_file rw_file_perms;
# Access /dev/ion
allow bufferhubd ion_device:chr_file r_file_perms;
# Receive sync fence FDs from mediacodec. Note that mediacodec never directly
# connects to bufferhubd via PDX. Instead, a VR app acts as a bridge between
# those two: it talks to mediacodec via Binder and talks to bufferhubd via PDX.
# Thus, there is no need to use use_pdx macro.
allow bufferhubd mediacodec:fd use;