From 42a61b8bae77e508c3fd6fd827c9b2389766b360 Mon Sep 17 00:00:00 2001 From: mtk07742 Date: Sat, 18 Jan 2020 10:21:24 +0800 Subject: [PATCH] [ALPS04821191] Add rules in system_server Add rules for proc_wlan_status and sysfs_pages_shared and sysfs_pages_sharing and sysfs_pages_unshared and sysfs_pages_volatile. MTK-Commit-Id: 7c7249f4597a69f068100da07e2773962c0bdba7 Change-Id: I6a3d7823295fd19b934ac0a28bef1f14ca8de2fa CR-Id: ALPS04821191 Feature: [Module]SystemServer --- non_plat/file.te | 11 +++++++++++ non_plat/genfs_contexts | 11 +++++++++++ non_plat/system_server.te | 13 ++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/non_plat/file.te b/non_plat/file.te index 73479f7..2b13fb0 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -413,3 +413,14 @@ type sysfs_pftch_qos, fs_type, sysfs_type; # Date : WK19.38 # Purpose: Android Migration for video codec driver type sysfs_device_tree_model, fs_type, sysfs_type; + +# Date : 2019/10/11 +# Purpose : allow system_server to access /proc/wlan/status for Q Migration +type proc_wlan_status, fs_type, proc_type; + +# Date : 2019/10/11 +# Purpose : allow system_server to access /sys/kernel/mm/ksm/pages_xxx +type sysfs_pages_shared, fs_type, sysfs_type; +type sysfs_pages_sharing, fs_type, sysfs_type; +type sysfs_pages_unshared, fs_type, sysfs_type; +type sysfs_pages_volatile, fs_type, sysfs_type; diff --git a/non_plat/genfs_contexts b/non_plat/genfs_contexts index 6bdae85..b10d6ec 100644 --- a/non_plat/genfs_contexts +++ b/non_plat/genfs_contexts @@ -249,3 +249,14 @@ genfscon sysfs /module/pftch_qos u:object_r:sysfs_pftch_qos:s0 # Date : WK19.38 # Purpose: Android Migration for video codec driver genfscon sysfs /firmware/devicetree/base/model u:object_r:sysfs_device_tree_model:s0 + +# Date : 2019/10/11 +# Purpose : allow system_server to access /proc/wlan/status for Q Migration +genfscon proc /wlan/status u:object_r:proc_wlan_status:s0 + +# Date : 2019/10/11 +# Purpose : allow system_server to access /sys/kernel/mm/ksm/pages_xxx +genfscon sysfs /kernel/mm/ksm/pages_shared u:object_r:sysfs_pages_shared:s0 +genfscon sysfs /kernel/mm/ksm/pages_sharing u:object_r:sysfs_pages_sharing:s0 +genfscon sysfs /kernel/mm/ksm/pages_unshared u:object_r:sysfs_pages_unshared:s0 +genfscon sysfs /kernel/mm/ksm/pages_volatile u:object_r:sysfs_pages_volatile:s0 diff --git a/non_plat/system_server.te b/non_plat/system_server.te index 6ab1d0a..a402675 100644 --- a/non_plat/system_server.te +++ b/non_plat/system_server.te @@ -234,4 +234,15 @@ allow system_server proc_thermal:dir search; allow system_server proc_atf_log:dir search; allow system_server proc_cpufreq:dir search; allow system_server proc_mtkcooler:dir search; -allow system_server proc_ppm:dir search; \ No newline at end of file +allow system_server proc_ppm:dir search; + +# Date : 2019/10/11 +# Operation : Q Migration +allow system_server proc_wlan_status:file getattr; + +# Date : 2019/10/11 +# Operation : Q Migration +allow system_server sysfs_pages_shared:file r_file_perms; +allow system_server sysfs_pages_sharing:file r_file_perms; +allow system_server sysfs_pages_unshared:file r_file_perms; +allow system_server sysfs_pages_volatile:file r_file_perms;