Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d180e5c0 authored by Alessio Balsini's avatar Alessio Balsini
Browse files

Relax ACLs for kprobe-related files in tracing sysfs



Among the /sys/kernel/tracing files that are already writable,
kprobes-related files and folders were not. This would prevent anyone
except root to read or write these files.
This patch extends the ACL permissions of kprobe event files with read
and write permissions to everyone, aiming at allowing traced (part of
Perfetto) and shell to use this kernel tracing feature. This extension
is limited to userdebug builds.

Bug: 359542775
Test: traced succeeds in creating and activating kprobe events
Change-Id: I6aa13e34987a5bf89a5a96b41d64dbb498aca0ae
Signed-off-by: default avatarAlessio Balsini <balsini@google.com>
parent d4497977
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -24,3 +24,7 @@ on post-fs
    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

    # Allow traced_probes to use the kprobe interface
    chmod 0666 /sys/kernel/debug/tracing/kprobe_events
    chmod 0666 /sys/kernel/tracing/kprobe_events