summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuaiming Li <huaiming.li@mediatek.com>2020-03-04 10:53:13 +0800
committerHuaiming Li <huaiming.li@mediatek.com>2020-03-04 10:53:13 +0800
commitafd5b7e2016e668b9b3ba5e38a8a669930f2be23 (patch)
tree4345f09ce64d27f0d2f72ade386cb32a6af849c2
parent8c2ce28a36be318fd5ff2e224b2fb0dfc25f3d6e (diff)
downloaddevice_mediatek_wembley-sepolicy-afd5b7e2016e668b9b3ba5e38a8a669930f2be23.tar.gz
device_mediatek_wembley-sepolicy-afd5b7e2016e668b9b3ba5e38a8a669930f2be23.tar.bz2
device_mediatek_wembley-sepolicy-afd5b7e2016e668b9b3ba5e38a8a669930f2be23.zip
[ALPS04975618] add aee hidl service
1. add aee hidl selinux rules Change-Id: I5a04c096d394735a4d928fd6a022f9ffc22e72fd CR-Id: ALPS04975618 Feature: Android Exception Engine(AEE)
-rw-r--r--non_plat/aee_aed.te2
-rw-r--r--non_plat/aee_hidl.te2
-rw-r--r--non_plat/attributes4
-rw-r--r--non_plat/file_contexts2
-rw-r--r--non_plat/hwservice.te2
-rw-r--r--non_plat/hwservice_contexts2
-rw-r--r--non_plat/mtk_hal_aee.te6
7 files changed, 16 insertions, 4 deletions
diff --git a/non_plat/aee_aed.te b/non_plat/aee_aed.te
index fb69ca2..9c1d19b 100644
--- a/non_plat/aee_aed.te
+++ b/non_plat/aee_aed.te
@@ -62,7 +62,7 @@ allow aee_aed proc_kpageflags:file r_file_perms;
# temp solution
get_prop(aee_aed, vendor_default_prop)
-hal_client_domain(aee_aed, mtk_hal_log)
+hal_client_domain(aee_aed, mtk_hal_aee)
# Purpose: create /data/aee_exp at runtime
allow aee_aed file_contexts_file:file r_file_perms;
diff --git a/non_plat/aee_hidl.te b/non_plat/aee_hidl.te
index 347cbdc..5bc639b 100644
--- a/non_plat/aee_hidl.te
+++ b/non_plat/aee_hidl.te
@@ -5,7 +5,7 @@ type aee_hal,domain;
type aee_hal_exec, exec_type, file_type, vendor_file_type;
typeattribute aee_hal mlstrustedsubject;
# Purpose : for create hidl server
-hal_server_domain(aee_hal, mtk_hal_log)
+hal_server_domain(aee_hal, mtk_hal_aee)
# ==============================================
# MTK Policy Rule
# ==============================================
diff --git a/non_plat/attributes b/non_plat/attributes
index e00aa73..9f50d0e 100644
--- a/non_plat/attributes
+++ b/non_plat/attributes
@@ -87,4 +87,6 @@ attribute mtk_hal_bgs;
attribute mtk_hal_bgs_client;
attribute mtk_hal_bgs_server;
-
+attribute mtk_hal_aee;
+attribute mtk_hal_aee_client;
+attribute mtk_hal_aee_server;
diff --git a/non_plat/file_contexts b/non_plat/file_contexts
index c17da3a..d3618b8 100644
--- a/non_plat/file_contexts
+++ b/non_plat/file_contexts
@@ -642,7 +642,7 @@
/vendor/lib(64)?/libtflite_mtk.so u:object_r:same_process_hal_file:s0
-/vendor/bin/hw/vendor\.mediatek\.hardware\.log@1\.0-service u:object_r:aee_hal_exec:s0
+/vendor/bin/hw/vendor\.mediatek\.hardware\.aee@1\.0-service u:object_r:aee_hal_exec:s0
/vendor/bin/loghidlvendorservice u:object_r:loghidlvendorservice_exec:s0
diff --git a/non_plat/hwservice.te b/non_plat/hwservice.te
index 6a7304a..88933c8 100644
--- a/non_plat/hwservice.te
+++ b/non_plat/hwservice.te
@@ -61,3 +61,5 @@ type mtk_hal_hdmi_hwservice, hwservice_manager_type;
# Date: 2019/09/06
# BGService HIDL
type mtk_hal_bgs_hwservice, hwservice_manager_type;
+
+type mtk_hal_aee_hwservice, hwservice_manager_type;
diff --git a/non_plat/hwservice_contexts b/non_plat/hwservice_contexts
index 614e502..f91c880 100644
--- a/non_plat/hwservice_contexts
+++ b/non_plat/hwservice_contexts
@@ -75,3 +75,5 @@ vendor.mediatek.hardware.hdmi::IMtkHdmiService u:object_r:mtk_hal_hdmi_hwservice
#Date: 2019/09/02
# ATMs hidl
vendor.mediatek.hardware.camera.atms::IATMs u:object_r:hal_camera_hwservice:s0
+
+vendor.mediatek.hardware.aee::IAee u:object_r:mtk_hal_aee_hwservice:s0
diff --git a/non_plat/mtk_hal_aee.te b/non_plat/mtk_hal_aee.te
new file mode 100644
index 0000000..9cbc548
--- /dev/null
+++ b/non_plat/mtk_hal_aee.te
@@ -0,0 +1,6 @@
+# HwBinder IPC from client to server, and callbacks
+binder_call(mtk_hal_aee_client, mtk_hal_aee_server)
+binder_call(mtk_hal_aee_server, mtk_hal_aee_client)
+
+add_hwservice(mtk_hal_aee_server, mtk_hal_aee_hwservice)
+allow mtk_hal_aee_client mtk_hal_aee_hwservice:hwservice_manager find;