From be9276466974f64b198701ea89b91b7e119de5be Mon Sep 17 00:00:00 2001 From: YiHo Cheng Date: Fri, 25 Feb 2022 22:38:02 +0800 Subject: [PATCH] thermal: Label tmu register dump sysfs Allow dumpstate to access tmu register dump sysfs [ 174.114566] type=1400 audit(1645790696.920:13): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_reg_dump_state" dev="sysfs" ino=65178 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 174.115092] type=1400 audit(1645790696.920:14): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_reg_dump_current_temp" dev="sysfs" in o=65179 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 174.115208] type=1400 audit(1645790696.920:15): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_top_reg_dump_rise_thres" dev="sysfs" ino=65180 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 174.115398] type=1400 audit(1645790696.920:16): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_top_reg_dump_fall_thres" dev="sysfs" ino=65182 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 [ 174.115498] type=1400 audit(1645790696.920:17): avc: denied { read } for comm="dumpstate@1.1-s" name="tmu_sub_reg_dump_rise_thres" dev="sysfs" ino=65181 scontext=u:r:hal_dumpstate_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 Bug: 215040856 Test: check tmu register dump sysfs output in dumpstate Change-Id: Ica48e37344a69264d4b4367af7856ec20b566a9e --- whitechapel_pro/genfs_contexts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/whitechapel_pro/genfs_contexts b/whitechapel_pro/genfs_contexts index 890ac47c..07afc0c3 100644 --- a/whitechapel_pro/genfs_contexts +++ b/whitechapel_pro/genfs_contexts @@ -208,6 +208,13 @@ genfscon sysfs /devices/platform/100a0000.ISP u:obje genfscon sysfs /devices/platform/100b0000.G3D u:object_r:sysfs_thermal:s0 genfscon sysfs /devices/platform/100b0000.TPU u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs_thermal/parameters/tmu_reg_dump_state u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs_thermal/parameters/tmu_reg_dump_current_temp u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs_thermal/parameters/tmu_top_reg_dump_rise_thres u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs_thermal/parameters/tmu_top_reg_dump_fall_thres u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs_thermal/parameters/tmu_sub_reg_dump_rise_thres u:object_r:sysfs_thermal:s0 +genfscon sysfs /module/gs_thermal/parameters/tmu_sub_reg_dump_fall_thres u:object_r:sysfs_thermal:s0 + # Camera 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