From 4c189644a959c5ed8d4271198c7c3f892f76a0af Mon Sep 17 00:00:00 2001 From: gilliu Date: Wed, 5 Jun 2024 04:00:36 +0000 Subject: [PATCH] add hal_graphics_composer to access thermal temperature type=1400 audit(0.0:77): avc: denied { search } for name="thermal" dev="tmpfs" ino=1618 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:thermal_link_device:s0 tclass=dir permissive=0 type=1400 audit(0.0:74): avc: denied { search } for name="thermal" dev="sysfs" ino=21594 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 type=1400 audit(0.0:74): avc: denied { read } for name="temp" dev="sysfs" ino=73536 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0 type=1400 audit(0.0:74): avc: denied { getattr } for path="/sys/devices/virtual/thermal/thermal_zone12/temp" dev="sysfs" ino=73537 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0 Bug: 340846691 Test: check no avc pattern on logcat from test image Flag: NONE add permission Change-Id: I0f327b98e32627e00be4cc0d0a99be39d1ec3bf2 --- vendor/hal_graphics_composer_default.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor/hal_graphics_composer_default.te b/vendor/hal_graphics_composer_default.te index 39dc7ee..893a34e 100644 --- a/vendor/hal_graphics_composer_default.te +++ b/vendor/hal_graphics_composer_default.te @@ -44,6 +44,9 @@ allow hal_graphics_composer_default vendor_log_file:dir search; # allow HWC to access powerstats allow hal_graphics_composer_default hal_power_stats_vendor_service:service_manager find; +allow hal_graphics_composer_default thermal_link_device:dir search; +allow hal_graphics_composer_default sysfs_thermal:dir search; +allow hal_graphics_composer_default sysfs_thermal:file r_file_perms; binder_call(hal_graphics_composer_default, hal_power_stats_default) # allow HWC to access IStats AIDL