转变为仅在内核留下Stub在外部加载KPM

This commit is contained in:
liankong
2025-03-31 13:55:48 +08:00
parent fff86dcc8d
commit af78f3bac4
6 changed files with 28 additions and 1436 deletions

View File

@@ -686,12 +686,6 @@ __maybe_unused int ksu_kprobe_init(void)
rc = register_kprobe(&renameat_kp);
pr_info("renameat kp: %d\n", rc);
#ifdef CONFIG_KPM
// KPM初始化状态
kpm_cfi_bypass_init();
// kpm_stack_init();
#endif
return rc;
}
@@ -699,11 +693,6 @@ __maybe_unused int ksu_kprobe_exit(void)
{
unregister_kprobe(&prctl_kp);
unregister_kprobe(&renameat_kp);
#ifdef CONFIG_KPM
// KPM取消状态
kpm_cfi_bypass_exit();
// kpm_stack_exit();
#endif
return 0;
}