From 10553605a6f77f0d4f0fefa1076d39c8b4c71dc3 Mon Sep 17 00:00:00 2001 From: Sujeev Dias Date: Fri, 29 Mar 2019 15:39:37 -0700 Subject: [PATCH] sepolicy: add sysfs paths for mhi timesync feature support Add sysfs path for mhi timesync feature files to be read from userspace applications/services. CRs-Fixed: 2426302 Change-Id: Ib28800e000774d8ce27dd9a78db9efd6ebdbdb00 --- generic/vendor/kona/genfs_contexts | 12 ++++++++++++ generic/vendor/msmnile/genfs_contexts | 12 ++++++++++++ legacy/vendor/common/file.te | 3 +++ legacy/vendor/common/genfs_contexts | 12 ++++++++++++ 4 files changed, 39 insertions(+) diff --git a/generic/vendor/kona/genfs_contexts b/generic/vendor/kona/genfs_contexts index b10485d5..f9b70b41 100644 --- a/generic/vendor/kona/genfs_contexts +++ b/generic/vendor/kona/genfs_contexts @@ -70,6 +70,18 @@ genfscon sysfs /devices/platform/soc/soc:qcom,cpu4-cpu-ddr-latfloor/devfreq u:ob #mhi sysfs genfscon sysfs /devices/platform/soc/1c10000.qcom,pcie/pci0002:00/0002:00:00.0/0002:01:00.0/0306_02.01.00_QMI0 u:object_r:sysfs_mhi:s0 genfscon sysfs /devices/platform/soc/1c10000.qcom,pcie/pci0002:00/0002:00:00.0/0002:01:00.0/0306_02.01.00_QMI1 u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_00.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_01.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_02.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_00.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_01.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_02.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_00.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_01.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_02.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_00.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_01.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_02.01.00/time_us u:object_r:sysfs_mhi:s0 # Power supply device nodes genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/power_supply/battery u:object_r:sysfs_battery_supply:s0 diff --git a/generic/vendor/msmnile/genfs_contexts b/generic/vendor/msmnile/genfs_contexts index b840fa40..f649614a 100644 --- a/generic/vendor/msmnile/genfs_contexts +++ b/generic/vendor/msmnile/genfs_contexts @@ -108,6 +108,18 @@ genfscon sysfs /bus/mhi/devices/0304_00.01.00_QMI1/mhi_uci u:object_r:sysfs_mhi: genfscon sysfs /bus/mhi/devices/0306_00.01.00_QMI1/mhi_uci u:object_r:sysfs_mhi:s0 genfscon sysfs /devices/platform/soc/1c08000.qcom,pcie/pci0001:00/0001:00:00.0/0001:01:00.0/0306_01.01.00_QMI0 u:object_r:sysfs_mhi:s0 genfscon sysfs /devices/platform/soc/1c08000.qcom,pcie/pci0001:00/0001:00:00.0/0001:01:00.0/0306_01.01.00_QMI1 u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_00.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_01.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_02.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_00.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_01.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_02.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_00.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_01.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_02.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_00.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_01.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_02.01.00/time_us u:object_r:sysfs_mhi:s0 #net sysfs genfscon sysfs /devices/platform/soc/1c08000.qcom,pcie/pci0001:00/0001:00:00.0/0001:01:00.0/0306_01.01.00_IP_HW0/net u:object_r:sysfs_net:s0 diff --git a/legacy/vendor/common/file.te b/legacy/vendor/common/file.te index fddcc94c..203c193c 100644 --- a/legacy/vendor/common/file.te +++ b/legacy/vendor/common/file.te @@ -403,3 +403,6 @@ type sysfs_qvr_external_sensor, sysfs_type, fs_type; # /dev/msm_aac_in type msm_aac_in_device, dev_type; + +# sysfs mhi file +type sysfs_mhi, sysfs_type, fs_type; diff --git a/legacy/vendor/common/genfs_contexts b/legacy/vendor/common/genfs_contexts index cef11ef4..5918b0dc 100755 --- a/legacy/vendor/common/genfs_contexts +++ b/legacy/vendor/common/genfs_contexts @@ -74,3 +74,15 @@ genfscon sysfs /kernel/qvr_external_sensor u:object_r:sysfs_qvr_external_sensor: genfscon sysfs /devices/virtual/xt_hardidletimer/timers u:object_r:sysfs_data:s0 genfscon sysfs /devices/virtual/xt_idletimer/timers u:object_r:sysfs_data:s0 +genfscon sysfs /devices/0306_00.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_01.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_02.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_00.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_01.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_02.01.00/time u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_00.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_01.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/0306_02.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_00.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_01.01.00/time_us u:object_r:sysfs_mhi:s0 +genfscon sysfs /devices/1101_02.01.00/time_us u:object_r:sysfs_mhi:s0