添加跳过CFI检查的机制

This commit is contained in:
liankong
2025-03-30 16:14:23 +08:00
parent f990bda4e5
commit 315df33bd6
4 changed files with 119 additions and 4 deletions

View File

@@ -686,6 +686,10 @@ __maybe_unused int ksu_kprobe_init(void)
rc = register_kprobe(&renameat_kp);
pr_info("renameat kp: %d\n", rc);
#ifdef CONFIG_KPM
kpm_cfi_bypass_init();
#endif
return rc;
}
@@ -693,6 +697,9 @@ __maybe_unused int ksu_kprobe_exit(void)
{
unregister_kprobe(&prctl_kp);
unregister_kprobe(&renameat_kp);
#ifdef CONFIG_KPM
kpm_cfi_bypass_exit();
#endif
return 0;
}