From 8bad0221a9627e4588b3a28c7e9b7df9a5cafa64 Mon Sep 17 00:00:00 2001 From: Ryan Zuklie Date: Mon, 8 Aug 2022 15:46:18 -0700 Subject: Add permissions to modify raw_syscall filters. These are to be used by traced in order to support tracing only a subset of all syscalls when using raw_syscall ftrace events. Currently, the associated files are only accessible in userdebug via selinux, so the corresponding chmods are userdebug-only too. Test: locally on-device with perfetto Change-Id: Ifc6def54ad269c3e09eda268c697b89f2b940baf --- cmds/atrace/atrace_userdebug.rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmds/atrace/atrace_userdebug.rc b/cmds/atrace/atrace_userdebug.rc index 9186514d0a..fa7be1816a 100644 --- a/cmds/atrace/atrace_userdebug.rc +++ b/cmds/atrace/atrace_userdebug.rc @@ -18,3 +18,9 @@ on post-fs chmod 0666 /sys/kernel/tracing/events/filemap/enable chmod 0666 /sys/kernel/debug/tracing/events/filemap/enable + # Allow traced_probes to use the raw_syscall filters to trace only a subset + # of syscalls. + chmod 0666 /sys/kernel/tracing/events/raw_syscalls/sys_enter/filter + chmod 0666 /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/filter + chmod 0666 /sys/kernel/tracing/events/raw_syscalls/sys_exit/filter + chmod 0666 /sys/kernel/debug/tracing/events/raw_syscalls/sys_exit/filter -- cgit v1.2.3-59-g8ed1b