Alex Klyubin | 357c161 | 2017-02-07 10:54:20 -0800 | [diff] [blame] | 1 | # Domain for atrace process spawned by boottrace service. |
| 2 | |
| 3 | type atrace_exec, exec_type, file_type; |
| 4 | |
Yasuhiro Matsuda | 3d32817 | 2015-06-24 15:24:17 +0900 | [diff] [blame] | 5 | userdebug_or_eng(` |
Jeff Vander Stoep | b5da252 | 2017-07-27 08:08:49 -0700 | [diff] [blame] | 6 | type atrace, domain, coredomain; |
Alex Klyubin | 357c161 | 2017-02-07 10:54:20 -0800 | [diff] [blame] | 7 | |
Yasuhiro Matsuda | 3d32817 | 2015-06-24 15:24:17 +0900 | [diff] [blame] | 8 | init_daemon_domain(atrace) |
Alex Klyubin | 357c161 | 2017-02-07 10:54:20 -0800 | [diff] [blame] | 9 | |
| 10 | # boottrace services uses /data/misc/boottrace/categories |
| 11 | allow atrace boottrace_data_file:dir search; |
| 12 | allow atrace boottrace_data_file:file r_file_perms; |
| 13 | |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 14 | # Allow atrace to access tracefs. |
| 15 | allow atrace debugfs_tracing:dir r_dir_perms; |
| 16 | allow atrace debugfs_tracing:file rw_file_perms; |
Carmen Jackson | 2c8ca45 | 2018-01-30 18:14:45 -0800 | [diff] [blame^] | 17 | allow atrace debugfs_tracing_debug:dir r_dir_perms; |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 18 | allow atrace debugfs_tracing_debug:file rw_file_perms; |
| 19 | allow atrace debugfs_trace_marker:file getattr; |
Alex Klyubin | 357c161 | 2017-02-07 10:54:20 -0800 | [diff] [blame] | 20 | |
| 21 | # atrace sets debug.atrace.* properties |
| 22 | set_prop(atrace, debug_prop) |
| 23 | |
| 24 | # atrace pokes all the binder-enabled processes at startup. |
| 25 | binder_use(atrace) |
| 26 | allow atrace healthd:binder call; |
| 27 | allow atrace surfaceflinger:binder call; |
Nick Kralevich | b56e6ef | 2016-12-09 20:14:31 -0800 | [diff] [blame] | 28 | ') |