From 397da7dd8310928d97080872b9965496d4b02c72 Mon Sep 17 00:00:00 2001 From: UtsavBalar1231 Date: Tue, 16 Jul 2024 12:56:42 +0530 Subject: [PATCH] sm6375-common: sepolicy: Allow setting read_ahead_kb on /data partition Change-Id: I2ac458dfcad8bb51b3c25da9dc03bdea91540ca3 Signed-off-by: UtsavBalar1231 --- sepolicy/vendor/file_contexts | 3 +++ sepolicy/vendor/vendor_init.te | 2 ++ sepolicy/vendor/vold.te | 1 + 3 files changed, 6 insertions(+) create mode 100644 sepolicy/vendor/vold.te diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index a1460c7..a1c1daa 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -61,6 +61,9 @@ # IFAA /(vendor|system/vendor)/bin/hw/vendor\.zui\.hardware\.ifaa@1\.0-service u:object_r:hal_ifaa_default_exec:s0 +# Label read_ahead_kb in /data partition +/sys/devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:0/block/sda/queue/read_ahead_kb u:object_r:vendor_sysfs_scsi_host:s0 + # LiveDisplay /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.1-service\.motorola_holi u:object_r:hal_lineage_livedisplay_qti_exec:s0 diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te index c200425..c3da346 100644 --- a/sepolicy/vendor/vendor_init.te +++ b/sepolicy/vendor/vendor_init.te @@ -3,3 +3,5 @@ set_prop(vendor_init, vendor_ims_prop) set_prop(vendor_init, vendor_mot_hw_prop) allow vendor_init proc_sched_lib_mask_cpuinfo:file w_file_perms; + +allow init vendor_sysfs_scsi_host:file w_file_perms; diff --git a/sepolicy/vendor/vold.te b/sepolicy/vendor/vold.te new file mode 100644 index 0000000..6804436 --- /dev/null +++ b/sepolicy/vendor/vold.te @@ -0,0 +1 @@ +allow vold vendor_sysfs_scsi_host:file w_file_perms;