• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# HwBinder IPC from client to server, and callbacks
2binder_call(hal_drm_client, hal_drm_server)
3binder_call(hal_drm_server, hal_drm_client)
4
5hal_attribute_hwservice(hal_drm, hal_drm_hwservice)
6
7allow hal_drm hidl_memory_hwservice:hwservice_manager find;
8
9# Required by Widevine DRM (b/22990512)
10allow hal_drm self:process execmem;
11
12# Permit reading device's serial number from system properties
13get_prop(hal_drm, serialno_prop)
14
15# Read files already opened under /data
16allow hal_drm system_data_file:file { getattr read };
17
18# Read access to pseudo filesystems
19r_dir_file(hal_drm, cgroup)
20allow hal_drm cgroup:dir { search write };
21allow hal_drm cgroup:file w_file_perms;
22
23r_dir_file(hal_drm, cgroup_v2)
24allow hal_drm cgroup_v2:dir { search write };
25allow hal_drm cgroup_v2:file w_file_perms;
26
27# Allow access to ion memory allocation device
28allow hal_drm ion_device:chr_file rw_file_perms;
29allow hal_drm hal_graphics_allocator:fd use;
30
31# Allow access to hidl_memory allocation service
32allow hal_drm hal_allocator_server:fd use;
33
34# Allow access to fds allocated by mediaserver
35allow hal_drm mediaserver:fd use;
36
37allow hal_drm sysfs:file r_file_perms;
38
39allow hal_drm tee_device:chr_file rw_file_perms;
40
41allow hal_drm_server { appdomain -isolated_app }:fd use;
42
43# only allow unprivileged socket ioctl commands
44allowxperm hal_drm self:{ rawip_socket tcp_socket udp_socket }
45  ioctl { unpriv_sock_ioctls unpriv_tty_ioctls };
46
47###
48### neverallow rules
49###
50
51# hal_drm should never execute any executable without a
52# domain transition
53neverallow hal_drm_server { file_type fs_type }:file execute_no_trans;
54
55# do not allow privileged socket ioctl commands
56neverallowxperm hal_drm_server domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;
57