1# 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 5hal_attribute_hwservice(hal_cas, hal_cas_hwservice) 6allow hal_cas_server hidl_memory_hwservice:hwservice_manager find; 7 8# Permit reading device's serial number from system properties 9get_prop(hal_cas_server, serialno_prop) 10 11# Read files already opened under /data 12allow hal_cas system_data_file:file { getattr read }; 13 14# Read access to pseudo filesystems 15r_dir_file(hal_cas, cgroup) 16allow hal_cas cgroup:dir { search write }; 17allow hal_cas cgroup:file w_file_perms; 18 19r_dir_file(hal_cas, cgroup_v2) 20allow hal_cas cgroup_v2:dir { search write }; 21allow hal_cas cgroup_v2:file w_file_perms; 22 23# Allow access to ion memory allocation device 24allow hal_cas ion_device:chr_file rw_file_perms; 25allow hal_cas hal_graphics_allocator:fd use; 26 27allow hal_cas tee_device:chr_file rw_file_perms; 28 29### 30### neverallow rules 31### 32 33# hal_cas should never execute any executable without a 34# domain transition 35neverallow hal_cas_server { file_type fs_type }:file execute_no_trans; 36 37# do not allow privileged socket ioctl commands 38neverallowxperm hal_cas_server domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls; 39