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/genfs_contexts b/private/genfs_contexts
index 3ff1012..62d6c1a 100644
--- a/private/genfs_contexts
+++ b/private/genfs_contexts
@@ -2,6 +2,7 @@
genfscon rootfs / u:object_r:rootfs:s0
# proc labeling can be further refined (longest matching prefix).
genfscon proc / u:object_r:proc:s0
+genfscon proc /allocinfo u:object_r:proc_allocinfo:s0
genfscon proc /asound u:object_r:proc_asound:s0
genfscon proc /bootconfig u:object_r:proc_bootconfig:s0
genfscon proc /buddyinfo u:object_r:proc_buddyinfo:s0