sepolicy: allow dumpstate to execute dump_power

08-22 09:10:30.200  7202  7202 I dump_power: type=1400 audit(0.0:830): avc:  denied  { read } for  name="acpm_stats" dev="sysfs" ino=24831 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_acpm_stats:s0 tclass=dir permissive=1
08-22 09:10:30.200  7202  7202 I dump_power: type=1400 audit(0.0:831): avc:  denied  { open } for  path="/sys/devices/platform/acpm_stats" dev="sysfs" ino=24831 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_acpm_stats:s0 tclass=dir permissive=1
08-22 09:10:30.200  7202  7202 I dump_power: type=1400 audit(0.0:832): avc:  denied  { search } for  name="acpm_stats" dev="sysfs" ino=24831 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_acpm_stats:s0 tclass=dir permissive=1
08-22 09:10:30.200  7202  7202 I dump_power: type=1400 audit(0.0:833): avc:  denied  { read } for  name="core_stats" dev="sysfs" ino=50367 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_acpm_stats:s0 tclass=file permissive=1
08-22 09:10:30.200  7202  7202 I dump_power: type=1400 audit(0.0:834): avc:  denied  { open } for  path="/sys/devices/platform/acpm_stats/core_stats" dev="sysfs" ino=50367 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_acpm_stats:s0 tclass=file permissive=1
08-22 09:10:30.200  7202  7202 I dump_power: type=1400 audit(0.0:835): avc:  denied  { getattr } for  path="/sys/devices/platform/acpm_stats/core_stats" dev="sysfs" ino=50367 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_acpm_stats:s0 tclass=file permissive=1
08-22 09:26:58.572 10656 10656 I dump_power: type=1400 audit(0.0:844): avc:  denied  { read } for  name="time_in_state" dev="sysfs" ino=46007 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_cpu:s0 tclass=file permissive=1
08-22 09:26:58.572 10656 10656 I dump_power: type=1400 audit(0.0:845): avc:  denied  { open } for  path="/sys/devices/platform/cpupm/cpupm/time_in_state" dev="sysfs" ino=46007 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_cpu:s0 tclass=file permissive=1
08-22 09:26:58.572 10656 10656 I dump_power: type=1400 audit(0.0:846): avc:  denied  { getattr } for  path="/sys/devices/platform/cpupm/cpupm/time_in_state" dev="sysfs" ino=46007 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_cpu:s0 tclass=file permissive=1
08-22 09:26:58.572 10656 10656 I dump_power: type=1400 audit(0.0:847): avc:  denied  { read } for  name="pm_genpd_summary" dev="debugfs" ino=1889 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:vendor_pm_genpd_debugfs:s0 tclass=file permissive=1
08-22 09:26:58.572 10656 10656 I dump_power: type=1400 audit(0.0:848): avc:  denied  { open } for  path="/sys/kernel/debug/pm_genpd/pm_genpd_summary" dev="debugfs" ino=1889 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:vendor_pm_genpd_debugfs:s0 tclass=file permissive=1
08-22 09:26:58.572 10656 10656 I dump_power: type=1400 audit(0.0:849): avc:  denied  { getattr } for  path="/sys/kernel/debug/pm_genpd/pm_genpd_summary" dev="debugfs" ino=1889 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:vendor_pm_genpd_debugfs:s0 tclass=file permissive=1
08-22 09:46:48.580  7468  7468 I dump_power: type=1400 audit(0.0:832): avc:  denied  { search } for  name="battery" dev="sysfs" ino=78091 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=1
08-22 09:46:48.580  7468  7468 I dump_power: type=1400 audit(0.0:833): avc:  denied  { read } for  name="uevent" dev="sysfs" ino=78092 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=file permissive=1
08-22 09:46:48.580  7468  7468 I dump_power: type=1400 audit(0.0:834): avc:  denied  { open } for  path="/sys/devices/platform/google,battery/power_supply/battery/uevent" dev="sysfs" ino=78092 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=file permissive=1
08-22 09:46:48.580  7468  7468 I dump_power: type=1400 audit(0.0:835): avc:  denied  { getattr } for  path="/sys/devices/platform/google,battery/power_supply/battery/uevent" dev="sysfs" ino=78092 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=file permissive=1
08-22 09:46:48.600  7468  7468 I dump_power: type=1400 audit(0.0:836): avc:  denied  { read } for  name="maxfg" dev="sysfs" ino=76330 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=1
08-22 09:46:48.600  7468  7468 I dump_power: type=1400 audit(0.0:837): avc:  denied  { read } for  name="logbuffer_tcpm" dev="tmpfs" ino=924 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:logbuffer_device:s0 tclass=chr_file permissive=1
08-22 09:54:11.732  7062  7062 I dump_power: type=1400 audit(0.0:836): avc:  denied  { search } for  name="mitigation" dev="dm-50" ino=3646 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:mitigation_vendor_data_file:s0 tclass=dir permissive=1
08-22 09:54:11.732  7062  7062 I dump_power: type=1400 audit(0.0:837): avc:  denied  { search } for  name="mitigation" dev="sysfs" ino=77466 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_bcl:s0 tclass=dir permissive=1
08-22 09:54:11.732  7062  7062 I dump_power: type=1400 audit(0.0:838): avc:  denied  { read } for  name="last_triggered_count" dev="sysfs" ino=77519 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_bcl:s0 tclass=dir permissive=1
08-22 09:54:11.732  7062  7062 I dump_power: type=1400 audit(0.0:839): avc:  denied  { open } for  path="/sys/devices/virtual/pmic/mitigation/last_triggered_count" dev="sysfs" ino=77519 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_bcl:s0 tclass=dir permissive=1
08-22 09:54:11.732  7062  7062 I dump_power: type=1400 audit(0.0:840): avc:  denied  { read } for  name="batoilo_count" dev="sysfs" ino=77531 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_bcl:s0 tclass=file permissive=1
08-22 09:54:11.732  7062  7062 I dump_power: type=1400 audit(0.0:841): avc:  denied  { open } for  path="/sys/devices/virtual/pmic/mitigation/last_triggered_count/batoilo_count" dev="sysfs" ino=77531 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_bcl:s0 tclass=file permissive=1
08-22 10:30:19.904  7230  7230 I android.hardwar: type=1400 audit(0.0:838): avc:  denied  { execute_no_trans } for  path="/vendor/bin/dump/dump_power" dev="overlay" ino=92 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:vendor_file:s0 tclass=file permissive=1
08-23 08:45:09.392 10793 10793 I dump_power: type=1400 audit(0.0:999): avc:  denied  { read } for  name="maxfg_history" dev="tmpfs" ino=1179 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:battery_history_device:s0 tclass=chr_file permissive=1
08-23 08:45:09.392 10793 10793 I dump_power: type=1400 audit(0.0:1000): avc:  denied  { open } for  path="/dev/logbuffer_tcpm" dev="tmpfs" ino=948 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:logbuffer_device:s0 tclass=chr_file permissive=1
08-23 08:45:09.392 10793 10793 I dump_power: type=1400 audit(0.0:1001): avc:  denied  { getattr } for  path="/dev/logbuffer_tcpm" dev="tmpfs" ino=948 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:logbuffer_device:s0 tclass=chr_file permissive=1
08-23 08:45:09.392 10793 10793 I dump_power: type=1400 audit(0.0:1002): avc:  denied  { open } for  path="/sys/devices/platform/10d60000.hsi2c" dev="sysfs" ino=22941 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=1
08-23 08:45:09.512 10793 10793 I dump_power: type=1400 audit(0.0:1003): avc:  denied  { getattr } for  path="/sys/devices/virtual/pmic/mitigation/last_triggered_count/batoilo_count" dev="sysfs" ino=85543 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs_bcl:s0 tclass=file permissive=1

Flag: EXEMPT refactor
Bug: 349935208
Change-Id: Ic4040da7ef299c029e6e893f5f14da07751c2ebc
Signed-off-by: samou <samou@google.com>
This commit is contained in:
samou 2024-07-17 11:06:22 +00:00
parent d952540c1c
commit c078a870cb

View file

@ -1,3 +1,20 @@
# To call battery_mitigation hal
allow dumpstate hal_battery_mitigation_service:service_manager find;
binder_call(dumpstate, battery_mitigation);
allow hal_dumpstate_default sysfs_acpm_stats:dir { read open search };
allow hal_dumpstate_default sysfs_acpm_stats:file { read open getattr };
allow hal_dumpstate_default sysfs_cpu:file { read open getattr };
allow hal_dumpstate_default sysfs_batteryinfo:dir { read open search };
allow hal_dumpstate_default sysfs_batteryinfo:file { read open getattr };
allow hal_dumpstate_default logbuffer_device:chr_file { read open getattr };
allow hal_dumpstate_default mitigation_vendor_data_file:dir { search };
allow hal_dumpstate_default sysfs_bcl:dir { read open search };
allow hal_dumpstate_default sysfs_bcl:file { read open getattr };
allow hal_dumpstate_default vendor_file:file { execute_no_trans };
allow hal_dumpstate_default battery_history_device:chr_file { read };
userdebug_or_eng(`
allow hal_dumpstate_default vendor_pm_genpd_debugfs:file { read open getattr };
')