kernel: Add KSU_MANUAL_HOOK configuration for manual KernelSU syscall hooking

This commit is contained in:
ShirkNeko
2025-08-15 23:00:11 +08:00
parent ec6991f98b
commit 6bb83fdb07
3 changed files with 13 additions and 6 deletions

View File

@@ -544,12 +544,11 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
// Checking hook usage
if (arg2 == CMD_HOOK_TYPE) {
const char *hook_type;
#ifdef CONFIG_KSU_TRACEPOINT_HOOK
hook_type = "Tracepoint";
#else
hook_type = "Kprobes";
const char *hook_type = "Kprobes";
#if defined(CONFIG_KSU_TRACEPOINT_HOOK)
hook_type = "Tracepoint";
#elif defined(CONFIG_KSU_MANUAL_HOOK)
hook_type = "Manual";
#endif
size_t len = strlen(hook_type) + 1;