sepolicy: allow sec_nvm to access UFS auto_hibernate sysfs

SPU Non-Volatile-Memory (NVM) is handled by sec_nvm service.
For best performance during fsync()/fdatasync() allow sec_nvm to
adjust UFS auto hibernation idle timer (ahit).

Change-Id: Iee7dffcba406daedcfbb32ad7dcf8569468a9df1
This commit is contained in:
Amir Samuelov 2020-05-26 12:02:17 +03:00 committed by Gerrit - the friendly Code Review server
parent c46af026ff
commit 45ec11259c
3 changed files with 6 additions and 0 deletions

View file

@ -434,6 +434,7 @@
/sys/devices(/platform)?/soc/[a-f0-9]+.sdhci/mmc_host/mmc0/clk_scaling(/.*)? u:object_r:vendor_sysfs_mmc_host:s0
/sys/devices(/platform)?/soc/[a-f0-9]+.ufshc/clkscale_enable u:object_r:vendor_sysfs_scsi_host:s0
/sys/devices(/platform)?/soc/[a-f0-9]+.ufshc/auto_hibern8 u:object_r:vendor_sysfs_scsi_host:s0
/sys/devices(/platform)?/soc/[a-f0-9]+/host0/scsi_host/host0(/.*)? u:object_r:vendor_sysfs_scsi_host:s0
/sys/devices(/platform)?/soc/[a-f0-9]+.ufshc/host0/target0:0:0/0:0:0:[0-9]+/scsi_generic(/.*)? u:object_r:vendor_sysfs_scsi_target:s0

View file

@ -59,6 +59,8 @@ allow vendor_init vendor_sysfs_slpi:file write;
allow vendor_init vendor_file:system module_load;
allow vendor_init vendor_sysfs_scsi_host:file { setattr };
allow vendor_init {
vendor_camera_data_file
vendor_tui_data_file

View file

@ -38,6 +38,9 @@ allow vendor_sec_nvm mnt_vendor_file:dir search;
allow vendor_sec_nvm vendor_persist_secnvm_file:dir rw_dir_perms;
allow vendor_sec_nvm vendor_persist_secnvm_file:file create_file_perms;
# UFS
allow vendor_sec_nvm vendor_sysfs_scsi_host:file rw_file_perms;
allow vendor_sec_nvm vendor_spcom_device:chr_file { getattr rw_file_perms };
allow vendor_sec_nvm vendor_sp_ssr_device:chr_file rw_file_perms;
set_prop(vendor_sec_nvm, vendor_spcomlib_prop)