platform_system_sepolicy/private/atrace.te
Joel Galenson 92fdd8954f Properly give some files the debugfs_tracing context only in debug mode.
One of my previous commits removed this, so I am now restoring it.

This commit also contains a bit of cleanup from previous commits by
removing some unneeded types.

It also fixes traceur by porting ag/2409144 to master.

Bug: 62413700, 62547086
Test: Built, flashed, and booted Marlin.  Verified that the files have
the correct context.  Verified that atrace and traceur work.

Change-Id: I76fa0e9060aff554687d57ab3976c8704a4068f0
2017-06-14 15:50:21 -07:00

27 lines
848 B
Text

# Domain for atrace process spawned by boottrace service.
type atrace_exec, exec_type, file_type;
userdebug_or_eng(`
type atrace, domain, coredomain, domain_deprecated;
init_daemon_domain(atrace)
# boottrace services uses /data/misc/boottrace/categories
allow atrace boottrace_data_file:dir search;
allow atrace boottrace_data_file:file r_file_perms;
# Allow atrace to access tracefs.
allow atrace debugfs_tracing:dir r_dir_perms;
allow atrace debugfs_tracing:file rw_file_perms;
allow atrace debugfs_tracing_debug:file rw_file_perms;
allow atrace debugfs_trace_marker:file getattr;
# atrace sets debug.atrace.* properties
set_prop(atrace, debug_prop)
# atrace pokes all the binder-enabled processes at startup.
binder_use(atrace)
allow atrace healthd:binder call;
allow atrace surfaceflinger:binder call;
')