Skip to content

Commit

Permalink
Guard a few logprint in prctl path with KSU_DEBUG (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviraxp authored Feb 29, 2024
1 parent 796f8a4 commit 3e2de84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/core_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
return 0;
}

// pr_info("option: 0x%x, cmd: %ld\n", option, arg2);
#ifdef CONFIG_KSU_DEBUG
pr_info("option: 0x%x, cmd: %ld\n", option, arg2);
#endif

if (arg2 == CMD_BECOME_MANAGER) {
// quick check
Expand All @@ -231,8 +233,10 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
return 0;
}
if (ksu_is_manager_uid_valid()) {
#ifdef CONFIG_KSU_DEBUG
pr_info("manager already exist: %d\n",
ksu_get_manager_uid());
#endif
return 0;
}

Expand Down

0 comments on commit 3e2de84

Please sign in to comment.