From 41d5d72ab43b3380ce71d338acf110429db49489 Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Wed, 1 Jun 2022 08:05:51 +0200 Subject: [PATCH] interfaces/builtin/system-observe: extend access for htop Htop supports various meters, including OOM score display, summary of process mappings memory use and PSI information Signed-off-by: Maciej Borzecki --- interfaces/builtin/system_observe.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interfaces/builtin/system_observe.go b/interfaces/builtin/system_observe.go index 7770b4de28c..73fc38433fe 100644 --- a/interfaces/builtin/system_observe.go +++ b/interfaces/builtin/system_observe.go @@ -58,6 +58,9 @@ ptrace (read), @{PROC}/diskstats r, @{PROC}/kallsyms r, @{PROC}/partitions r, +@{PROC}/pressure/cpu r, +@{PROC}/pressure/io r, +@{PROC}/pressure/memory r, @{PROC}/sys/kernel/panic r, @{PROC}/sys/kernel/panic_on_oops r, @{PROC}/sys/vm/max_map_count r, @@ -71,6 +74,11 @@ ptrace (read), @{PROC}/*/{,task/*/}comm r, @{PROC}/*/{,task/*/}exe r, @{PROC}/*/{,task/*/}fdinfo/* r, +@{PROC}/*/{,task/*/}oom_score r, +# allow reading of smaps_rollup, which is a summary of the memory use of a process, +# but not smaps which contains a detailed mappings breakdown like +# /proc/self/maps, which we do not allow access to for other processes +@{PROC}/*/{,task/*/}smaps_rollup r, @{PROC}/*/{,task/*/}stat r, @{PROC}/*/{,task/*/}statm r, @{PROC}/*/{,task/*/}status r,