diff options
author | Kalesh Singh <kaleshsingh@google.com> | 2021-12-06 16:13:06 -0800 |
---|---|---|
committer | Kalesh Singh <kaleshsingh@google.com> | 2022-01-14 18:50:40 +0000 |
commit | 71429a9738471920772df0d5d50a820aa0d50fbe (patch) | |
tree | b330df4f7f3485b8614c3f7ac8a2a08a6e041135 | |
parent | 739f4f5f609846f11072ec5e0a45fdd8c4225e29 (diff) |
Add group ID for reading tracefs
Add AID_READTRACEFS and mount tracefs with gid=AID_READTRACEFS
Bug: 209513178
Bug: 214061655
Test: adb shell ls -l /sys/kernel/tracing/events
Change-Id: Ibbfdf8a4b771bd7520ecbaaf15a1153d6bf0e599
Merged-In: Ibbfdf8a4b771bd7520ecbaaf15a1153d6bf0e599
-rw-r--r-- | libcutils/include/private/android_filesystem_config.h | 1 | ||||
-rw-r--r-- | rootdir/init.rc | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libcutils/include/private/android_filesystem_config.h b/libcutils/include/private/android_filesystem_config.h index 8f22d8983..ffd4d1285 100644 --- a/libcutils/include/private/android_filesystem_config.h +++ b/libcutils/include/private/android_filesystem_config.h @@ -157,6 +157,7 @@ #define AID_READPROC 3009 /* Allow /proc read access */ #define AID_WAKELOCK 3010 /* Allow system wakelock read/write access */ #define AID_UHID 3011 /* Allow read/write to /dev/uhid node */ +#define AID_READTRACEFS 3012 /* Allow tracefs read */ /* The range 5000-5999 is also reserved for vendor partition. */ #define AID_OEM_RESERVED_2_START 5000 diff --git a/rootdir/init.rc b/rootdir/init.rc index 3f5876f48..5116c0fea 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -78,8 +78,8 @@ on early-init mkdir /dev/boringssl 0755 root root mkdir /dev/boringssl/selftest 0755 root root - # Mount tracefs - mount tracefs tracefs /sys/kernel/tracing + # Mount tracefs (with GID=AID_READTRACEFS) + mount tracefs tracefs /sys/kernel/tracing gid=3012 # create sys dirctory mkdir /dev/sys 0755 system system |