allow android.hardware.power.stats-service.pixel to access display sysfs

Fix the follwoing violations:
avc: denied { read } for name="state" dev="sysfs" ino=68654
scontext=u:r:hal_power_stats_default:s0 tcontext=u:object_r:sysfs_sensors:s0
tclass=file
...
avc: denied { open } for path=
"/sys/devices/platform/1c2c0000.drmdsim/1c2c0000.drmdsim.0/backlight/panel0-backlight/state"
dev="sysfs" ino=68654 scontext=u:r:hal_power_stats_default:s0
tcontext=u:object_r:sysfs_sensors:s0 tclass=file

Bug: 209704948
Change-Id: Iad586164811457d09f6c0e81c67c0f217b77ccc2
Signed-off-by: Shiyong Li <shiyongli@google.com>
This commit is contained in:
Shiyong Li 2021-12-09 00:06:28 +00:00
parent a4f16bf147
commit 8bae253501
2 changed files with 3 additions and 3 deletions

View file

@ -25,6 +25,3 @@ dontaudit hal_power_stats_default sysfs_wifi:dir { search };
dontaudit hal_power_stats_default sysfs_wifi:file { getattr };
dontaudit hal_power_stats_default sysfs_wifi:file { open };
dontaudit hal_power_stats_default sysfs_wifi:file { read };
# b/209704948
dontaudit hal_power_stats_default sysfs_sensors:file { open };
dontaudit hal_power_stats_default sysfs_sensors:file { read };

View file

@ -1,2 +1,5 @@
allow hal_power_stats_default sysfs_scsi_devices_0000:dir r_dir_perms;
allow hal_power_stats_default sysfs_scsi_devices_0000:file r_file_perms;
# allowed to access dislay stats sysfs node
allow hal_power_stats_default sysfs_sensors:file r_file_perms;