kernel: no need to remark process on post-fs-data and boot-completed

- Remark on post-fs-data may unmark zygote unexpectedly, and there is no
necessity to remark on these stages, so simply remove them.
This commit is contained in:
5ec1cff
2025-11-15 17:19:45 +08:00
committed by ShirkNeko
parent 83209a5259
commit 04ca981e4d
2 changed files with 4 additions and 11 deletions

View File

@@ -242,7 +242,7 @@ static inline bool check_syscall_fastpath(int nr)
}
}
// Unmark init's child that are not zygote or adbd
// Unmark init's child that are not zygote, adbd or ksud
int ksu_handle_init_mark_tracker(const char __user **filename_user)
{
char path[64];
@@ -253,7 +253,8 @@ int ksu_handle_init_mark_tracker(const char __user **filename_user)
memset(path, 0, sizeof(path));
strncpy_from_user_nofault(path, *filename_user, sizeof(path));
if (likely(strstr(path, "/app_process") == NULL && strstr(path, "/adbd") == NULL)) {
if (likely(strstr(path, "/app_process") == NULL && strstr(path, "/adbd") == NULL && strstr(path, "/ksud") == NULL)) {
pr_info("hook_manager: unmark %d exec %s", current->pid, path);
ksu_clear_task_tracepoint_flag_if_needed(current);
}