blob: bb9eec42c993c4413c8ec4e0b2333eaf25b6df25 [file] [log] [blame]
Alex Klyubinac2b4cd2017-02-13 14:40:49 -08001# HwBinder IPC from client to server, and callbacks
2binder_call(hal_audio_client, hal_audio_server)
3binder_call(hal_audio_server, hal_audio_client)
4
Steven Moreland9234e002018-06-06 09:30:18 -07005hal_attribute_hwservice(hal_audio, hal_audio_hwservice)
Alex Klyubin53656c12017-04-13 19:05:27 -07006
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -07007allow hal_audio ion_device:chr_file r_file_perms;
8
Mikhail Naganov80483852017-10-18 20:28:33 +00009r_dir_file(hal_audio, proc)
Tri Vo464f59a2017-10-06 10:20:53 -070010r_dir_file(hal_audio, proc_asound)
Sunny Kapdibc0c88f2017-10-30 12:58:20 -070011allow hal_audio_server audio_device:dir r_dir_perms;
12allow hal_audio_server audio_device:chr_file rw_file_perms;
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070013
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080014# Needed to provide debug dump output via dumpsys' pipes.
15allow hal_audio shell:fd use;
16allow hal_audio shell:fifo_file write;
Mikhail Naganov9686cbc2017-05-04 13:25:52 -070017allow hal_audio dumpstate:fd use;
18allow hal_audio dumpstate:fifo_file write;
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080019
Haynes Mathew Georgeebc7b432018-02-27 16:21:27 -080020# allow hal audio to use vnbinder
21vndbinder_use(hal_audio)
22
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070023###
24### neverallow rules
25###
26
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080027# Should never execute any executable without a domain transition
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080028neverallow hal_audio_server { file_type fs_type }:file execute_no_trans;
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070029
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080030# Should never need network access.
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070031# Disallow network sockets.
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080032neverallow hal_audio_server domain:{ tcp_socket udp_socket rawip_socket } *;
Jeff Vander Stoep7fa59c82017-03-13 22:03:10 -070033
34# Only audio HAL may directly access the audio hardware
Vignesh Kulothungan155ca122019-03-18 17:21:17 -070035neverallow { halserverdomain -hal_audio_server -hal_omx_server } audio_device:chr_file *;
Jaekyun Seok224921d2018-04-09 12:07:32 +090036
37get_prop(hal_audio, bluetooth_a2dp_offload_prop)
Cheney Nie55a74b2019-03-18 11:07:32 +080038get_prop(hal_audio, bluetooth_audio_hal_prop)