Selinux: Fix perfprofd policy

Update for debugfs labeling changes.

Update for simpleperf behavior with stack traces (temp file).

Bug: 73175642
Test: m
Test: manual - run profiling, look for logs
Change-Id: Ie000a00ef56cc603f498d48d89001f566c03b661
This commit is contained in:
Andreas Gampe 2018-03-30 13:10:35 -07:00
parent a6d9d6b68a
commit c8fe29ff1e

View file

@ -82,10 +82,12 @@ userdebug_or_eng(`
# simpleperf examines debugfs on startup to collect tracepoint event types # simpleperf examines debugfs on startup to collect tracepoint event types
r_dir_file(perfprofd, debugfs_tracing) r_dir_file(perfprofd, debugfs_tracing)
allow perfprofd debugfs_tracing_debug:file r_file_perms; r_dir_file(perfprofd, debugfs_tracing_debug)
# simpleperf is going to execute "sleep" # simpleperf is going to execute "sleep"
allow perfprofd toolbox_exec:file rx_file_perms; allow perfprofd toolbox_exec:file rx_file_perms;
# simpleperf is going to execute "mv" on a temp file
allow perfprofd shell_exec:file rx_file_perms;
# needed for simpleperf on some kernels # needed for simpleperf on some kernels
allow perfprofd self:global_capability_class_set ipc_lock; allow perfprofd self:global_capability_class_set ipc_lock;