Add sepolicy for gralloc-alloc HAL am: dd958e5a21
am: aeb6d5bfcb
am: 9d6d2a9d88
Change-Id: I629b4d10533b9ce7d7e53c74e101de0bc5541614
This commit is contained in:
commit
837a6f20b0
11 changed files with 25 additions and 0 deletions
|
@ -225,6 +225,7 @@
|
||||||
/system/lib(64)?/libart.* u:object_r:libart_file:s0
|
/system/lib(64)?/libart.* u:object_r:libart_file:s0
|
||||||
/system/bin/hw/android\.hardware\.audio@2\.0-service u:object_r:hal_audio_exec:s0
|
/system/bin/hw/android\.hardware\.audio@2\.0-service u:object_r:hal_audio_exec:s0
|
||||||
/system/bin/hw/android\.hardware\.boot@1\.0-service u:object_r:hal_boot_exec:s0
|
/system/bin/hw/android\.hardware\.boot@1\.0-service u:object_r:hal_boot_exec:s0
|
||||||
|
/system/bin/hw/android\.hardware\.graphics\.allocator@2\.0-service u:object_r:hal_graphics_allocator_exec:s0
|
||||||
/system/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_exec:s0
|
/system/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_exec:s0
|
||||||
/system/bin/hw/android\.hardware\.memtrack@1\.0-service u:object_r:hal_memtrack_exec:s0
|
/system/bin/hw/android\.hardware\.memtrack@1\.0-service u:object_r:hal_memtrack_exec:s0
|
||||||
/system/bin/hw/android\.hardware\.nfc@1\.0-service u:object_r:hal_nfc_exec:s0
|
/system/bin/hw/android\.hardware\.nfc@1\.0-service u:object_r:hal_nfc_exec:s0
|
||||||
|
|
1
private/hal_graphics_allocator.te
Normal file
1
private/hal_graphics_allocator.te
Normal file
|
@ -0,0 +1 @@
|
||||||
|
init_daemon_domain(hal_graphics_allocator)
|
|
@ -243,6 +243,8 @@ auditallow appdomain ion_device:chr_file { write append };
|
||||||
# TODO audit ion ioctl usage by apps
|
# TODO audit ion ioctl usage by apps
|
||||||
auditallow appdomain ion_device:chr_file ioctl;
|
auditallow appdomain ion_device:chr_file ioctl;
|
||||||
|
|
||||||
|
allow { appdomain -isolated_app } hal_graphics_allocator:fd use;
|
||||||
|
|
||||||
# TODO: switch to meminfo service
|
# TODO: switch to meminfo service
|
||||||
allow appdomain proc_meminfo:file r_file_perms;
|
allow appdomain proc_meminfo:file r_file_perms;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ allow bootanim audioserver_service:service_manager find;
|
||||||
|
|
||||||
# Allow access to ion memory allocation device
|
# Allow access to ion memory allocation device
|
||||||
allow bootanim ion_device:chr_file rw_file_perms;
|
allow bootanim ion_device:chr_file rw_file_perms;
|
||||||
|
allow bootanim hal_graphics_allocator:fd use;
|
||||||
|
|
||||||
# Read access to pseudo filesystems.
|
# Read access to pseudo filesystems.
|
||||||
r_dir_file(bootanim, proc)
|
r_dir_file(bootanim, proc)
|
||||||
|
|
|
@ -15,6 +15,7 @@ allow cameraserver video_device:dir r_dir_perms;
|
||||||
allow cameraserver video_device:chr_file rw_file_perms;
|
allow cameraserver video_device:chr_file rw_file_perms;
|
||||||
allow cameraserver camera_device:chr_file rw_file_perms;
|
allow cameraserver camera_device:chr_file rw_file_perms;
|
||||||
allow cameraserver ion_device:chr_file rw_file_perms;
|
allow cameraserver ion_device:chr_file rw_file_perms;
|
||||||
|
allow cameraserver hal_graphics_allocator:fd use;
|
||||||
|
|
||||||
allow cameraserver appops_service:service_manager find;
|
allow cameraserver appops_service:service_manager find;
|
||||||
allow cameraserver audioserver_service:service_manager find;
|
allow cameraserver audioserver_service:service_manager find;
|
||||||
|
|
10
public/hal_graphics_allocator.te
Normal file
10
public/hal_graphics_allocator.te
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# graphics buffer allocator subsystem
|
||||||
|
type hal_graphics_allocator, domain;
|
||||||
|
type hal_graphics_allocator_exec, exec_type, file_type;
|
||||||
|
|
||||||
|
# hwbinder access
|
||||||
|
hwbinder_use(hal_graphics_allocator)
|
||||||
|
|
||||||
|
# GPU device access
|
||||||
|
allow hal_graphics_allocator gpu_device:chr_file rw_file_perms;
|
||||||
|
allow hal_graphics_allocator ion_device:chr_file r_file_perms;
|
|
@ -15,6 +15,7 @@ allow mediacodec gpu_device:chr_file rw_file_perms;
|
||||||
allow mediacodec video_device:chr_file rw_file_perms;
|
allow mediacodec video_device:chr_file rw_file_perms;
|
||||||
allow mediacodec video_device:dir search;
|
allow mediacodec video_device:dir search;
|
||||||
allow mediacodec ion_device:chr_file rw_file_perms;
|
allow mediacodec ion_device:chr_file rw_file_perms;
|
||||||
|
allow mediacodec hal_graphics_allocator:fd use;
|
||||||
|
|
||||||
###
|
###
|
||||||
### neverallow rules
|
### neverallow rules
|
||||||
|
|
|
@ -30,6 +30,7 @@ allow mediadrmserver cgroup:file w_file_perms;
|
||||||
|
|
||||||
# Allow access to ion memory allocation device
|
# Allow access to ion memory allocation device
|
||||||
allow mediadrmserver ion_device:chr_file rw_file_perms;
|
allow mediadrmserver ion_device:chr_file rw_file_perms;
|
||||||
|
allow mediadrmserver hal_graphics_allocator:fd use;
|
||||||
|
|
||||||
# Allow access to app_data and media_data_files
|
# Allow access to app_data and media_data_files
|
||||||
allow mediadrmserver media_data_file:dir create_dir_perms;
|
allow mediadrmserver media_data_file:dir create_dir_perms;
|
||||||
|
|
|
@ -124,6 +124,8 @@ allow mediaserver media_rw_data_file:file create_file_perms;
|
||||||
allow mediaserver preloads_data_file:file { getattr read ioctl };
|
allow mediaserver preloads_data_file:file { getattr read ioctl };
|
||||||
|
|
||||||
allow mediaserver ion_device:chr_file r_file_perms;
|
allow mediaserver ion_device:chr_file r_file_perms;
|
||||||
|
allow mediaserver hal_graphics_allocator:fd use;
|
||||||
|
|
||||||
allow mediaserver system_server:fd use;
|
allow mediaserver system_server:fd use;
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
|
@ -4,6 +4,10 @@ type surfaceflinger_exec, exec_type, file_type;
|
||||||
|
|
||||||
typeattribute surfaceflinger mlstrustedsubject;
|
typeattribute surfaceflinger mlstrustedsubject;
|
||||||
|
|
||||||
|
# Perform HwBinder IPC.
|
||||||
|
hwbinder_use(surfaceflinger)
|
||||||
|
binder_call(surfaceflinger, hal_graphics_allocator)
|
||||||
|
|
||||||
# Perform Binder IPC.
|
# Perform Binder IPC.
|
||||||
binder_use(surfaceflinger)
|
binder_use(surfaceflinger)
|
||||||
binder_call(surfaceflinger, binderservicedomain)
|
binder_call(surfaceflinger, binderservicedomain)
|
||||||
|
|
|
@ -567,6 +567,7 @@ allow system_server preloads_data_file:dir { r_dir_perms write remove_name rmdir
|
||||||
|
|
||||||
r_dir_file(system_server, cgroup)
|
r_dir_file(system_server, cgroup)
|
||||||
allow system_server ion_device:chr_file r_file_perms;
|
allow system_server ion_device:chr_file r_file_perms;
|
||||||
|
allow system_server hal_graphics_allocator:fd use;
|
||||||
|
|
||||||
r_dir_file(system_server, proc)
|
r_dir_file(system_server, proc)
|
||||||
r_dir_file(system_server, proc_meminfo)
|
r_dir_file(system_server, proc_meminfo)
|
||||||
|
|
Loading…
Reference in a new issue