Jamie Gennis | 1279013 | 2012-06-06 18:12:48 -0700 | [diff] [blame] | 1 | ## Permissions to allow system-wide tracing to the kernel trace buffer. |
| 2 | ## |
| 3 | on boot |
| 4 | |
| 5 | # Allow writing to the kernel trace log. |
| 6 | chmod 0222 /sys/kernel/debug/tracing/trace_marker |
| 7 | |
| 8 | # Allow the shell group to enable (some) kernel tracing. |
| 9 | chown root shell /sys/kernel/debug/tracing/trace_clock |
| 10 | chown root shell /sys/kernel/debug/tracing/buffer_size_kb |
| 11 | chown root shell /sys/kernel/debug/tracing/options/overwrite |
Carton He | dd8fddd | 2013-12-05 14:14:30 +0800 | [diff] [blame] | 12 | chown root shell /sys/kernel/debug/tracing/options/print-tgid |
Jamie Gennis | 1279013 | 2012-06-06 18:12:48 -0700 | [diff] [blame] | 13 | chown root shell /sys/kernel/debug/tracing/events/sched/sched_switch/enable |
| 14 | chown root shell /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable |
| 15 | chown root shell /sys/kernel/debug/tracing/events/power/cpu_frequency/enable |
| 16 | chown root shell /sys/kernel/debug/tracing/events/power/cpu_idle/enable |
Todd Poynor | 4ef6e4b | 2012-10-15 17:04:47 -0700 | [diff] [blame] | 17 | chown root shell /sys/kernel/debug/tracing/events/power/clock_set_rate/enable |
Jamie Gennis | 1279013 | 2012-06-06 18:12:48 -0700 | [diff] [blame] | 18 | chown root shell /sys/kernel/debug/tracing/events/cpufreq_interactive/enable |
| 19 | chown root shell /sys/kernel/debug/tracing/tracing_on |
| 20 | |
| 21 | chmod 0664 /sys/kernel/debug/tracing/trace_clock |
| 22 | chmod 0664 /sys/kernel/debug/tracing/buffer_size_kb |
| 23 | chmod 0664 /sys/kernel/debug/tracing/options/overwrite |
Carton He | dd8fddd | 2013-12-05 14:14:30 +0800 | [diff] [blame] | 24 | chmod 0664 /sys/kernel/debug/tracing/options/print-tgid |
Jamie Gennis | 1279013 | 2012-06-06 18:12:48 -0700 | [diff] [blame] | 25 | chmod 0664 /sys/kernel/debug/tracing/events/sched/sched_switch/enable |
| 26 | chmod 0664 /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable |
| 27 | chmod 0664 /sys/kernel/debug/tracing/events/power/cpu_frequency/enable |
| 28 | chmod 0664 /sys/kernel/debug/tracing/events/power/cpu_idle/enable |
Todd Poynor | 4ef6e4b | 2012-10-15 17:04:47 -0700 | [diff] [blame] | 29 | chmod 0664 /sys/kernel/debug/tracing/events/power/clock_set_rate/enable |
Jamie Gennis | 1279013 | 2012-06-06 18:12:48 -0700 | [diff] [blame] | 30 | chmod 0664 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable |
| 31 | chmod 0664 /sys/kernel/debug/tracing/tracing_on |
| 32 | |
| 33 | # Allow only the shell group to read and truncate the kernel trace. |
| 34 | chown root shell /sys/kernel/debug/tracing/trace |
| 35 | chmod 0660 /sys/kernel/debug/tracing/trace |