Give init and dumpstate access to /proc/allocinfo
/proc/allocinfo is a file that presents a snapshot of how much memory
and how many memory allocations are triggered, by kernel location.
This is an important debugging information that should be collected as
part of bugreports.
This change gives access to the file to init, so that it can change
permissions to access the file, and dumpstate, so that it can read the
file contents.
Bug: 384777823
Test: adb shell dumpstate
Change-Id: I5b0401c44b5994416bc9217e4adbd3a781eb6b2c
Signed-off-by: Alessio Balsini <balsini@google.com>
diff --git a/private/init.te b/private/init.te
index 23c464c..35d7647 100644
--- a/private/init.te
+++ b/private/init.te
@@ -539,6 +539,7 @@
allow init {
proc # b/67049235 processes /proc/<pid>/* files are mislabeled.
+ proc_allocinfo
proc_bootconfig
proc_cmdline
proc_diskstats
@@ -574,6 +575,7 @@
# init chmod/chown access to /proc files.
allow init {
+ proc_allocinfo
proc_cmdline
proc_bootconfig
proc_kmsg