From 047b2f6abd88ab63469b0d5e4deba421dba78c40 Mon Sep 17 00:00:00 2001 From: Bavyasritha Alahari Date: Mon, 19 Jul 2021 16:11:05 +0530 Subject: [PATCH] sepolicy: Add SE policy to allow audio HAL Add sepolicy to have access to /dev/msm_adsp_sleepmon. Policy added in hal_audio_default. Change-Id: I764ca2f0b6bff0536382803fd250e9e7efa61f65 --- generic/vendor/common/device.te | 1 + generic/vendor/common/file_contexts | 1 + generic/vendor/common/hal_audio_default.te | 2 ++ 3 files changed, 4 insertions(+) mode change 100755 => 100644 generic/vendor/common/file_contexts diff --git a/generic/vendor/common/device.te b/generic/vendor/common/device.te index 6b865827..b9853959 100644 --- a/generic/vendor/common/device.te +++ b/generic/vendor/common/device.te @@ -101,3 +101,4 @@ type vendor_qce_device, dev_type; type vendor_npu_device, dev_type; type vendor_qmcs_block_device, dev_type; type vendor_qdss_device, dev_type; +type vendor_adsp_sleepmon_device, dev_type; diff --git a/generic/vendor/common/file_contexts b/generic/vendor/common/file_contexts old mode 100755 new mode 100644 index 3dd8f91f..a7364318 --- a/generic/vendor/common/file_contexts +++ b/generic/vendor/common/file_contexts @@ -78,6 +78,7 @@ /dev/ipa_odl_ctl u:object_r:vendor_ipa_dev:s0 /dev/ipa_adpl u:object_r:vendor_ipa_dev:s0 /dev/byte-cntr u:object_r:vendor_qdss_device:s0 +/dev/msm_adsp_sleepmon u:object_r:vendor_adsp_sleepmon_device:s0 # dev socket nodes /dev/socket/chre u:object_r:vendor_chre_socket:s0 diff --git a/generic/vendor/common/hal_audio_default.te b/generic/vendor/common/hal_audio_default.te index 26f35730..08a89cad 100644 --- a/generic/vendor/common/hal_audio_default.te +++ b/generic/vendor/common/hal_audio_default.te @@ -29,6 +29,8 @@ userdebug_or_eng(` allow hal_audio vendor_diag_device:chr_file rw_file_perms; ') +allow hal_audio vendor_adsp_sleepmon_device:chr_file rw_file_perms; + hal_client_domain(hal_audio_default, vendor_hal_perf) hal_client_domain(hal_audio_default, hal_power)