From ca0622247251d6c817b87893a56c03ff71c753c9 Mon Sep 17 00:00:00 2001 From: YiHo Cheng Date: Thu, 6 Jan 2022 06:21:08 +0800 Subject: [PATCH] thermal: Label tmu register dump sysfs Allow dumpstate to access tmu register dump sysfs [ 1155.422181] type=1400 audit(1641335196.892:8): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_reg_dump_state" dev="sysfs" ino=68561 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 1155.423398] type=1400 audit(1641335196.892:9): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_reg_dump_current_temp" dev="sysfs" ino =68562 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 1155.443740] type=1400 audit(1641335196.896:10): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_top_reg_dump_rise_thres" dev="sysfs" ino=68563 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 1155.466064] type=1400 audit(1641335196.896:11): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_top_reg_dump_fall_thres" dev="sysfs" ino=68565 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 1155.488251] type=1400 audit(1641335196.916:12): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_sub_reg_dump_rise_thres" dev="sysfs" ino=68564 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 1155.510614] type=1400 audit(1641335196.960:13): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_sub_reg_dump_fall_thres" dev="sysfs" ino=68566 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 o Bug: 202736838 Test: check thermal section in dumpstate Change-Id: Icecca9f69ee9b57d43aa2864864951bf66c4905f --- whitechapel/vendor/google/genfs_contexts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/whitechapel/vendor/google/genfs_contexts b/whitechapel/vendor/google/genfs_contexts index cea476c4..3029d7f7 100644 --- a/whitechapel/vendor/google/genfs_contexts +++ b/whitechapel/vendor/google/genfs_contexts @@ -324,6 +324,14 @@ genfscon sysfs /devices/platform/sjtag_gsa/interface u:object_ genfscon sysfs /devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/min_freq u:object_r:sysfs_camera:s0 genfscon sysfs /devices/platform/17000060.devfreq_tnr/devfreq/17000060.devfreq_tnr/min_freq u:object_r:sysfs_camera:s0 +# thermal sysfs files +genfscon sysfs /module/gs101_thermal/parameters/tmu_reg_dump_state u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs101_thermal/parameters/tmu_reg_dump_current_temp u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs101_thermal/parameters/tmu_top_reg_dump_rise_thres u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs101_thermal/parameters/tmu_top_reg_dump_fall_thres u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs101_thermal/parameters/tmu_sub_reg_dump_rise_thres u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs101_thermal/parameters/tmu_sub_reg_dump_fall_thres u:object_r:sysfs_thermal:s0 + # USB-C throttling stats genfscon sysfs /devices/platform/google,usbc_port_cooling_dev/cleared_time u:object_r:sysfs_usbc_throttling_stats:s0 genfscon sysfs /devices/platform/google,usbc_port_cooling_dev/hysteresis_time u:object_r:sysfs_usbc_throttling_stats:s0