summaryrefslogtreecommitdiff
path: root/libutils/Unicode.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2019-01-02 08:27:22 -0800
committerMark Salyzyn <salyzyn@google.com>2019-01-04 13:49:48 -0800
commitda2aeb0c42fee80c02227adb73c0f246bf5f7089 (patch)
tree7c0d7bcd6710358adbe7e5208bda62168e592baf /libutils/Unicode.cpp
parent8a5f0817634c4837cb092c00cc3cd0cc41b9cc9b (diff)
llkd: handle 'adbd shell setsid' to preserve adbd
A zombie setsid process occurs when adb shell setsid <command> is issued, however llkd can only detect if it is a result of a kernel livelock by killing the associated parent, which would be adbd; resulting in the adb connection(s) being terminated. Will special case this condition in order to preserve adbd for debugging purposes. We parse <parent>&<child> in ro.llk.blacklist.parent as this association, thus adbd&[setsid] covers this special case. Ampersand was selected because it is never part of a process name, however a setprop in the shell requires it to be escaped or quoted; init rc file where this is normally specified does not have issue. getComm() is effectively pure, so hold on to the return value for sake of efficiency. This also reverts commit 599958d1148c1137bee925f4cf08eda7f8050d98 which granted adbd blanket parent immunity from monitoring on userdebug builds. The new logic is a more refined means of preserving the live lock checking associated with adbd and allows the operation to be performed on user builds. POC: date ; adb shell setsid sleep 900 ; date Positive for bug, reports less than 15 minutes, otherwise solved. Test: llkd_unit_test Bug: 120983740 Change-Id: I6442463a48499d925a3a074423a24a1622905559
Diffstat (limited to 'libutils/Unicode.cpp')
0 files changed, 0 insertions, 0 deletions