mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Allow zygote to execve
Allow zygote to execute other programs (such as dex2oat). This fixes the bug that cause ART framework boot images failed to load and result to extremely serious performance degradation. Fix #1195
This commit is contained in:
parent
faf4d76388
commit
4581354e7a
@ -424,11 +424,13 @@ void proc_monitor() {
|
|||||||
if (attaches[pid] && check_pid(pid))
|
if (attaches[pid] && check_pid(pid))
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
|
case PTRACE_EVENT_EXEC:
|
||||||
case PTRACE_EVENT_EXIT:
|
case PTRACE_EVENT_EXIT:
|
||||||
PTRACE_LOG("exited with status: [%d]\n", msg);
|
PTRACE_LOG("exited or execve\n", msg);
|
||||||
attaches[pid] = false;
|
attaches[pid] = false;
|
||||||
unknowns[pid] = false;
|
unknowns[pid] = false;
|
||||||
break;
|
xptrace(PTRACE_DETACH, pid);
|
||||||
|
continue;
|
||||||
default:
|
default:
|
||||||
PTRACE_LOG("unknown event: %d\n", WEVENT(status));
|
PTRACE_LOG("unknown event: %d\n", WEVENT(status));
|
||||||
break;
|
break;
|
||||||
@ -438,7 +440,8 @@ void proc_monitor() {
|
|||||||
} else if (WSTOPSIG(status) == SIGSTOP) {
|
} else if (WSTOPSIG(status) == SIGSTOP) {
|
||||||
if (attaches[pid]) {
|
if (attaches[pid]) {
|
||||||
PTRACE_LOG("SIGSTOP from zygote child\n");
|
PTRACE_LOG("SIGSTOP from zygote child\n");
|
||||||
xptrace(PTRACE_SETOPTIONS, pid, nullptr, PTRACE_O_TRACECLONE | PTRACE_O_TRACEEXIT);
|
xptrace(PTRACE_SETOPTIONS, pid, nullptr,
|
||||||
|
PTRACE_O_TRACECLONE | PTRACE_O_TRACEEXEC | PTRACE_O_TRACEEXIT);
|
||||||
} else {
|
} else {
|
||||||
PTRACE_LOG("SIGSTOP from unknown\n");
|
PTRACE_LOG("SIGSTOP from unknown\n");
|
||||||
unknowns[pid] = true;
|
unknowns[pid] = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user