kernel: guard functionality that requires kprobes

Since upstream is now making kprobes a requirement, we adapt this tree to still allow
building with manual hooks in an easier way. Furthermore, this also allows a user to
build with manual hooks even with kprobes enabled.

Offending commit:
	kernel: remove unused CONFIG guard becuase GKI kernel enable kprobe by default
	upstream: https://github.com/tiann/KernelSU/commit/500ff9b

Other changes:
	ksud.c, stop_input_hook(), short-circuit redundant logic left by this change.
	cherry pick from: https://github.com/backslashxx/KernelSU/commit/a3d3e93

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
This commit is contained in:
backslashxx
2025-02-23 22:19:44 +08:00
committed by rifsxd
parent 85866848ea
commit 097451d578
5 changed files with 30 additions and 17 deletions

View File

@@ -968,7 +968,7 @@ void __init ksu_core_init(void)
void ksu_core_exit(void)
{
#ifdef CONFIG_KPROBES
#ifdef CONFIG_KSU_WITH_KPROBES
pr_info("ksu_core_kprobe_exit\n");
// we dont use this now
// ksu_kprobe_exit();