From ebb5b3bd48b834ac9594eecaad0f543b6babd8fb Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Wed, 29 Jan 2020 09:10:47 -0800 Subject: [PATCH] Correct /sys/kernel/tracing permissions In Android kernels >4.4 we will see an empty /sys/kernel/tracing directory which is notionally where you should mount tracefs if you don't want to mount debugfs. As we move towards not mounting debugfs, ensure that the non-legacy location also has adequate permissions to be read by tracing tools. Note that this change will be OK even if the board init.rc doesn't mount tracefs here, because sysfs will always create this directory. Bug: 148436518 Change-Id: I674587d0f08effdb8471a82e3b1ceec3af8588de --- rootdir/init.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index e57580814..7e29ff097 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -489,6 +489,7 @@ on post-fs on late-fs # Ensure that tracefs has the correct permissions. # This does not work correctly if it is called in post-fs. + chmod 0755 /sys/kernel/tracing chmod 0755 /sys/kernel/debug/tracing # HALs required before storage encryption can get unlocked (FBE/FDE)