96505fad80
Feature outlined here is only available on userdebug or eng builds. Blocked for security reasons because requires ptrace capabilities. Add ro.llk.stack to list a set of symbols that should rarely happen but if persistent in multiple checks, indicates a live lock condition. At ro.llk.stack.timeout_ms the process is sent a kill, if it remains, then panic the kernel. There is no ABA detection in the paths, the condition for the stack symbol being present instantaneously must be its rarity of being caught. If a livelock occurs in the path of the symbol, then it is possible more than one path could be stuck in the state, but the best candidate symbols are found underneath a lock resulting in only one process being the culprit, and the best aim. There may be processes that induce a look of persistence, if so the symbol is not a candidate for checking. Add ro.llk.blacklist.process.stack to list process names we want to skip checking. This configuration parameter is also used to prevent sepolicy noise when trying to acquire stacks from non ptrace'able services. Test: gTest llkd_unit_tests Bug: 33808187 Bug: 111910505 Bug: 80502612 Change-Id: Ie71221e371b189bbdda2a1155d47826997842dcc
19 lines
547 B
Text
19 lines
547 B
Text
on property:ro.debuggable=1
|
|
setprop llk.enable ${ro.llk.enable:-1}
|
|
setprop khungtask.enable ${ro.khungtask.enable:-1}
|
|
|
|
on property:ro.llk.enable=eng
|
|
setprop llk.enable ${ro.debuggable:-0}
|
|
|
|
on property:ro.khungtask.enable=eng
|
|
setprop khungtask.enable ${ro.debuggable:-0}
|
|
|
|
service llkd-1 /system/bin/llkd
|
|
class late_start
|
|
disabled
|
|
user llkd
|
|
group llkd readproc
|
|
capabilities KILL IPC_LOCK SYS_PTRACE DAC_OVERRIDE
|
|
file /dev/kmsg w
|
|
file /proc/sysrq-trigger w
|
|
writepid /dev/cpuset/system-background/tasks
|