blob: 056b4c998c920777b5d24288a96cd249a3b32f88 [file] [log] [blame]
Dan Cashman91d398d2017-09-26 12:58:29 -07001# HwBinder IPC from client to server, and callbacks
2binder_call(hal_cas_client, hal_cas_server)
3binder_call(hal_cas_server, hal_cas_client)
4
Steven Moreland9234e002018-06-06 09:30:18 -07005hal_attribute_hwservice(hal_cas, hal_cas_hwservice)
Dan Cashman91d398d2017-09-26 12:58:29 -07006allow hal_cas_server hidl_memory_hwservice:hwservice_manager find;
7
Shraddha Basantwanibacf9492022-09-21 17:35:31 +05308hal_attribute_service(hal_cas, hal_cas_service)
9
10binder_call(hal_cas_server, servicemanager)
11binder_call(hal_cas_client, servicemanager)
12
Dan Cashman91d398d2017-09-26 12:58:29 -070013# Permit reading device's serial number from system properties
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080014get_prop(hal_cas_server, serialno_prop)
Dan Cashman91d398d2017-09-26 12:58:29 -070015
16# Read files already opened under /data
Dan Cashman91d398d2017-09-26 12:58:29 -070017allow hal_cas system_data_file:file { getattr read };
Dan Cashman91d398d2017-09-26 12:58:29 -070018
19# Read access to pseudo filesystems
20r_dir_file(hal_cas, cgroup)
21allow hal_cas cgroup:dir { search write };
22allow hal_cas cgroup:file w_file_perms;
23
Marco Ballesioaa4ce952021-02-11 15:18:11 -080024r_dir_file(hal_cas, cgroup_v2)
25allow hal_cas cgroup_v2:dir { search write };
26allow hal_cas cgroup_v2:file w_file_perms;
27
Dan Cashman91d398d2017-09-26 12:58:29 -070028# Allow access to ion memory allocation device
29allow hal_cas ion_device:chr_file rw_file_perms;
30allow hal_cas hal_graphics_allocator:fd use;
31
32allow hal_cas tee_device:chr_file rw_file_perms;
33
34###
35### neverallow rules
36###
37
38# hal_cas should never execute any executable without a
39# domain transition
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080040neverallow hal_cas_server { file_type fs_type }:file execute_no_trans;
Dan Cashman91d398d2017-09-26 12:58:29 -070041
42# do not allow privileged socket ioctl commands
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080043neverallowxperm hal_cas_server domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;