From 88203440b2800dfc00ee5039c03d73fd2928b040 Mon Sep 17 00:00:00 2001 From: "Peter (YM)" Date: Thu, 25 Apr 2024 05:55:08 +0000 Subject: [PATCH] thermal: allow thermal_hal to read sysfs_gpu Update the sepolicy for thermalhal to read sysfs_gpu to access the basic gpu info. Bug: 336698561 Test: Flash Build and boot to home, run adb shell dumpsys android.hardware.thermal.IThermal/default, check the cdevceiling and hardlimit number for gpu Change-Id: I6e722e108284ee0d7a0c86a9e50749ecf4b354a5 Signed-off-by: Peter (YM) --- thermal/sepolicy/thermal_hal/hal_thermal_default.te | 1 + 1 file changed, 1 insertion(+) diff --git a/thermal/sepolicy/thermal_hal/hal_thermal_default.te b/thermal/sepolicy/thermal_hal/hal_thermal_default.te index 45ccf3a..41a0f5e 100644 --- a/thermal/sepolicy/thermal_hal/hal_thermal_default.te +++ b/thermal/sepolicy/thermal_hal/hal_thermal_default.te @@ -5,6 +5,7 @@ allow hal_thermal_default thermal_link_device:dir r_dir_perms; allow hal_thermal_default proc_stat:file r_file_perms; allow hal_thermal_default self:netlink_generic_socket create_socket_perms_no_ioctl; allow hal_thermal_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; +allow hal_thermal_default sysfs_gpu:file r_file_perms; hal_client_domain(hal_thermal_default, hal_power);