添加 KPM 模块支持,包括 KPM 配置选项、核心功能实现及相关头文件

This commit is contained in:
ShirkNeko
2025-03-30 02:54:23 +08:00
parent ba5b3dde88
commit 743ddce9f7
10 changed files with 1519 additions and 2 deletions

View File

@@ -506,6 +506,22 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
return 0;
}
#ifdef CONFIG_KPM
// ADD: 添加KPM模块控制
if(sukisu_is_kpm_control_code(arg2)) {
int res;
pr_info("KPM: calling before arg2=%d\n", (int) arg2);
res = sukisu_handle_kpm(arg2, arg3, arg4);
copy_to_user(result, &res, sizeof(res));
pr_info("KPM: calling before arg2=%d res=%d\n", (int) arg2, (int) res);
return 0;
}
#endif
#ifdef CONFIG_KSU_SUSFS
if (current_uid_val == 0) {
#ifdef CONFIG_KSU_SUSFS_SUS_PATH