Skip to content
Snippets Groups Projects
Commit 77a236c9 authored by Stephen Smalley's avatar Stephen Smalley
Browse files

Allow dumpstate to dump backtraces of certain native processes.


The list of processes comes from frameworks/native/cmds/dumpstate/utils.c.
dumpstate calls dump_backtrace_to_file() for each such process, which
asks debuggerd to dump the backtrace.

Resolves denials such as:
 avc:  denied  { dump_backtrace } for  scontext=u:r:dumpstate:s0 tcontext=u:r:surfaceflinger:s0 tclass=debuggerd
 avc:  denied  { dump_backtrace } for  scontext=u:r:dumpstate:s0 tcontext=u:r:drmserver:s0 tclass=debuggerd
 avc:  denied  { dump_backtrace } for  scontext=u:r:dumpstate:s0 tcontext=u:r:mediaserver:s0 tclass=debuggerd
 avc:  denied  { dump_backtrace } for  scontext=u:r:dumpstate:s0 tcontext=u:r:sdcardd:s0 tclass=debuggerd

Change-Id: Idbfb0fef0aac138073b7217b7dbad826a1193098
Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
parent 21ada26d
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,8 @@ allow dumpstate { appdomain system_server }:process signal; ...@@ -48,6 +48,8 @@ allow dumpstate { appdomain system_server }:process signal;
# Signal native processes to dump their stack. # Signal native processes to dump their stack.
# This list comes from native_processes_to_dump in dumpstate/utils.c # This list comes from native_processes_to_dump in dumpstate/utils.c
allow dumpstate { drmserver mediaserver sdcardd surfaceflinger }:process signal; allow dumpstate { drmserver mediaserver sdcardd surfaceflinger }:process signal;
# Ask debuggerd for the backtraces of these processes.
allow dumpstate { drmserver mediaserver sdcardd surfaceflinger }:debuggerd dump_backtrace;
# Execute and transition to the vdc domain # Execute and transition to the vdc domain
domain_auto_trans(dumpstate, vdc_exec, vdc) domain_auto_trans(dumpstate, vdc_exec, vdc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment