xref: /aosp_15_r20/system/sepolicy/private/hal_graphics_composer.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Worker# HwBinder IPC from client to server, and callbacks
2*e4a36f41SAndroid Build Coastguard Workerbinder_call(hal_graphics_composer_client, hal_graphics_composer_server)
3*e4a36f41SAndroid Build Coastguard Workerbinder_call(hal_graphics_composer_server, hal_graphics_composer_client)
4*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer_client hal_graphics_composer_server_tmpfs:file { getattr map read write };
5*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer_server hal_graphics_composer_client_tmpfs:file { getattr map read write };
6*e4a36f41SAndroid Build Coastguard Worker
7*e4a36f41SAndroid Build Coastguard Workerhal_attribute_hwservice(hal_graphics_composer, hal_graphics_composer_hwservice)
8*e4a36f41SAndroid Build Coastguard Worker
9*e4a36f41SAndroid Build Coastguard Worker# Coordinate with hal_graphics_mapper
10*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer_server hal_graphics_mapper_hwservice:hwservice_manager find;
11*e4a36f41SAndroid Build Coastguard Worker
12*e4a36f41SAndroid Build Coastguard Worker# GPU device access
13*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer gpu_device:chr_file rw_file_perms;
14*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer gpu_device:dir r_dir_perms;
15*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer ion_device:chr_file r_file_perms;
16*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer dmabuf_system_heap_device:chr_file r_file_perms;
17*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer hal_graphics_allocator:fd use;
18*e4a36f41SAndroid Build Coastguard Worker
19*e4a36f41SAndroid Build Coastguard Worker# Access /dev/graphics/fb0.
20*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer graphics_device:dir search;
21*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer graphics_device:chr_file rw_file_perms;
22*e4a36f41SAndroid Build Coastguard Worker
23*e4a36f41SAndroid Build Coastguard Worker# Fences
24*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer system_server:fd use;
25*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer bootanim:fd use;
26*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer appdomain:fd use;
27*e4a36f41SAndroid Build Coastguard Worker
28*e4a36f41SAndroid Build Coastguard Worker# allow self to set SCHED_FIFO
29*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer self:global_capability_class_set sys_nice;
30*e4a36f41SAndroid Build Coastguard Worker
31*e4a36f41SAndroid Build Coastguard Worker# allow surfaceflinger to use a pipe for dumpsys output
32*e4a36f41SAndroid Build Coastguard Workerallow hal_graphics_composer_server hal_graphics_composer_client:fifo_file write;
33*e4a36f41SAndroid Build Coastguard Worker
34*e4a36f41SAndroid Build Coastguard Worker
35*e4a36f41SAndroid Build Coastguard Workerbinder_call(hal_graphics_composer_client, servicemanager)
36*e4a36f41SAndroid Build Coastguard Workerbinder_call(hal_graphics_composer_server, servicemanager)
37*e4a36f41SAndroid Build Coastguard Worker
38*e4a36f41SAndroid Build Coastguard Workerhal_attribute_service(hal_graphics_composer, hal_graphics_composer_service)
39