summaryrefslogtreecommitdiffstats
path: root/sdm660
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-09-12 03:14:09 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-09-12 03:14:09 -0700
commit97ceab1d2715673fc08f6c23f5ed5e2d3c00bdc8 (patch)
treed13e88ebb43057364ee7e5ba82cd85e7f1c41a60 /sdm660
parenta98d93e52c0c9a5dca7c3e257a80d47989e926c7 (diff)
parent689108cbe4767fad54472553b21aefff6f2a23cd (diff)
downloadandroid_device_qcom_sepolicy-97ceab1d2715673fc08f6c23f5ed5e2d3c00bdc8.tar.gz
android_device_qcom_sepolicy-97ceab1d2715673fc08f6c23f5ed5e2d3c00bdc8.tar.bz2
android_device_qcom_sepolicy-97ceab1d2715673fc08f6c23f5ed5e2d3c00bdc8.zip
Merge "Declare context for emmc for sdm660"
Diffstat (limited to 'sdm660')
-rw-r--r--sdm660/file.te (renamed from sdm660/device.te)3
-rw-r--r--sdm660/file_contexts13
-rw-r--r--sdm660/qti-logkit.te33
3 files changed, 49 insertions, 0 deletions
diff --git a/sdm660/device.te b/sdm660/file.te
index 3db9e628..7144270b 100644
--- a/sdm660/device.te
+++ b/sdm660/file.te
@@ -24,3 +24,6 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#sysfs emmc dload type
+type sysfs_emmc_dload, sysfs_type, fs_type;
diff --git a/sdm660/file_contexts b/sdm660/file_contexts
index 86741051..7ea83331 100644
--- a/sdm660/file_contexts
+++ b/sdm660/file_contexts
@@ -143,3 +143,16 @@
#
/vendor/lib(64)?/hw/gralloc\.sdm660\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/vulkan\.sdm660\.so u:object_r:same_process_hal_file:s0
+
+##################################
+# rawdump partition
+/sys/kernel/dload/emmc_dload u:object_r:sysfs_emmc_dload:s0
+/sys/kernel/dload/dload_mode u:object_r:sysfs_emmc_dload:s0
+
+#EMMC
+/dev/block/platform/soc/c0c4000.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
+/dev/block/platform/soc/c0c4000.sdhci/by-name/ramdump u:object_r:rawdump_block_device:s0
+
+#UFS
+/dev/block/platform/soc/1da4000.ufshc/by-name/rawdump u:object_r:rawdump_block_device:s0
+/dev/block/platform/soc/1da4000.ufshc/by-name/ramdump u:object_r:rawdump_block_device:s0
diff --git a/sdm660/qti-logkit.te b/sdm660/qti-logkit.te
new file mode 100644
index 00000000..af328f52
--- /dev/null
+++ b/sdm660/qti-logkit.te
@@ -0,0 +1,33 @@
+# Copyright (c) 2017, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# allow qti_logkit for rawdump partition
+allow qti_logkit block_device:dir r_dir_perms;
+allow qti_logkit rawdump_block_device:blk_file rw_file_perms;
+
+# allow qti_logkit for sysfs emmc dload node
+allow qti_logkit sysfs_emmc_dload:file rw_file_perms;