From 61589cef5b6cf2f0e5121a29ae0373e69a059d38 Mon Sep 17 00:00:00 2001 From: Richard Chang Date: Tue, 29 Oct 2024 08:29:08 +0000 Subject: [PATCH] powerhint: Add WriteOnly flag for PA_KILL to avoid SELinux error The node "/sys/kernel/vendor_mm/pa_kill/reclaim_kb" is write-only. So we need to add WriteOnly flag to prevent powerhal to read the node. SELinux errors: avc: denied { dac_read_search } for comm="android.hardwar" capability=2 scontext=u:r:hal_power_default:s0 tcontext=u:r:hal_power_default:s0 tclass=capability permissive=0 avc: denied { dac_override } for comm="android.hardwar" capability=1 scontext=u:r:hal_power_default:s0 tcontext=u:r:hal_power_default:s0 tclass=capability permissive=0 Bug: 350830411 Change-Id: I649e263a5371782184ce712fef3e8d42941806d7 Test: adb shell dumpsys android.hardware.power.IPower/default, check if any avc denied messages Flag: EXEMPT config json change --- powerhint-comet.json | 1 + 1 file changed, 1 insertion(+) diff --git a/powerhint-comet.json b/powerhint-comet.json index 11e9447..6877507 100644 --- a/powerhint-comet.json +++ b/powerhint-comet.json @@ -958,6 +958,7 @@ "102400", "0" ], + "WriteOnly": true, "ResetOnInit": false }, {