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