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
53 lines
796 B
Text
53 lines
796 B
Text
cc_library_headers {
|
|
name: "llkd_headers",
|
|
|
|
export_include_dirs: ["include"],
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libllkd",
|
|
|
|
srcs: [
|
|
"libllkd.cpp",
|
|
],
|
|
|
|
shared_libs: [
|
|
"libbase",
|
|
"libcutils",
|
|
"liblog",
|
|
],
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
cflags: ["-Werror"],
|
|
|
|
product_variables: {
|
|
debuggable: {
|
|
cppflags: ["-D__PTRACE_ENABLED__"],
|
|
},
|
|
},
|
|
}
|
|
|
|
cc_binary {
|
|
name: "llkd",
|
|
|
|
srcs: [
|
|
"llkd.cpp",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
"libcutils",
|
|
"liblog",
|
|
],
|
|
static_libs: [
|
|
"libllkd",
|
|
],
|
|
cflags: ["-Werror"],
|
|
|
|
init_rc: ["llkd.rc"],
|
|
product_variables: {
|
|
debuggable: {
|
|
init_rc: ["llkd-debuggable.rc"],
|
|
},
|
|
},
|
|
}
|