From 23e11dee2990379bfc457a6d61487689dbf4b4b3 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Mon, 24 Oct 2022 22:57:43 +0300 Subject: [PATCH] lito: Allow init write to discard_max_bytes system/core/rootdir/init.rc 1110: write /dev/sys/block/by-name/userdata/queue/discard_max_bytes 134217728 1111: write /dev/sys/block/by-name/rootdisk/queue/discard_max_bytes 134217728 Fixes: avc: denied { write } for comm="init" name="discard_max_bytes" dev="sysfs" ino=59119 scontext=u:r:init:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 Change-Id: I16fcaa7bd52d6933d37edd1b04f3ba5b0a9e9b77 --- generic/vendor/lito/genfs_contexts | 1 + 1 file changed, 1 insertion(+) diff --git a/generic/vendor/lito/genfs_contexts b/generic/vendor/lito/genfs_contexts index 3b96354c..fd8fa41e 100644 --- a/generic/vendor/lito/genfs_contexts +++ b/generic/vendor/lito/genfs_contexts @@ -136,3 +136,4 @@ genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.q # UFS genfscon sysfs /devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:0/block/sda/queue/discard_max_bytes u:object_r:vendor_sysfs_mmc_host:s0 +genfscon sysfs /devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:4/block/sde/queue/discard_max_bytes u:object_r:vendor_sysfs_mmc_host:s0