From 5d817ed1031c1b2d0d103888f14df125e51fbde5 Mon Sep 17 00:00:00 2001 From: "Kevin F. Haggerty" Date: Fri, 16 Nov 2018 15:45:08 -0700 Subject: [PATCH] msm8974-common: sepolicy: Label sysfs_mmc_host, resolve denials * avc: denied { write } for name="control" dev="sysfs" ino=25383 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_mmc_host:s0 tclass=file permissive=1 * avc: denied { open } for name="control" dev="sysfs" ino=25383 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_mmc_host:s0 tclass=file permissive=1 Change-Id: I876d025db9cf1fe67faeccca830ffd53dbf92904 --- sepolicy/common/file_contexts | 1 + sepolicy/common/init.te | 1 + 2 files changed, 2 insertions(+) diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts index b2f8a4a..e91a036 100644 --- a/sepolicy/common/file_contexts +++ b/sepolicy/common/file_contexts @@ -46,6 +46,7 @@ # sysfs - block/storage /sys/devices/msm_sdcc\.[0-9]/mmc_host/mmc[0-9]/mmc[0-9]:[0-9]+/block/mmcblk[0-9]/bkops_en u:object_r:sysfs_io_sched_tuneable:s0 /sys/devices/msm_sdcc\.[0-9]/mmc_host/mmc[0-9]/mmc[0-9]:[0-9]+/block/mmcblk[0-9]/stat u:object_r:sysfs_disk_stat:s0 +/sys/devices/msm_sdcc\.[0-9]/mmc_host/mmc[0-9]/power(/.*)? u:object_r:sysfs_mmc_host:s0 # sysfs - cpu/perf /sys/devices/system/soc/soc0(/.*)? u:object_r:sysfs_socinfo:s0 diff --git a/sepolicy/common/init.te b/sepolicy/common/init.te index f1f9fa6..f1f062e 100644 --- a/sepolicy/common/init.te +++ b/sepolicy/common/init.te @@ -30,6 +30,7 @@ allow init { }:file setattr; allow init { + sysfs_mmc_host sysfs_msm_perf sysfs_sec_key }:file w_file_perms;