From 1a05283cd9730adc2ff8889357d4411aaed85ab1 Mon Sep 17 00:00:00 2001 From: Robert Benea Date: Wed, 30 Aug 2017 14:02:38 -0700 Subject: [PATCH] Allow lmkd read memcg stats. Currently lmkd is not able to read memcg info. The mem/swap usage info are used by lmkd to ugrade medium pressure events to critical level. Test: tested on gobo Bug: 65180281 Change-Id: I19d0eb53d5e754c176ffeda1b5d07049e6af8570 --- public/lmkd.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/lmkd.te b/public/lmkd.te index f4e6c2d57..208720ca6 100644 --- a/public/lmkd.te +++ b/public/lmkd.te @@ -27,6 +27,9 @@ allow lmkd appdomain:process sigkill; # Clean up old cgroups allow lmkd cgroup:dir { remove_name rmdir }; +# Allow to read memcg stats +allow lmkd cgroup:file r_file_perms; + # Set self to SCHED_FIFO allow lmkd self:capability sys_nice;