kernel: Modified dynamic signature All files have been renamed to the correct names: Dynamic Manager

This commit is contained in:
ShirkNeko
2025-08-24 11:00:17 +08:00
parent c58e557fcd
commit 444aefd5d5
8 changed files with 160 additions and 159 deletions

View File

@@ -50,6 +50,7 @@
#include "throne_tracker.h"
#include "kernel_compat.h"
#include "include/ksu_creds.h"
#include "dynamic_manager.h"
#ifdef CONFIG_KPM
#include "kpm/kpm.h"
@@ -429,31 +430,31 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
return 0;
}
// Allow the root manager to configure dynamic signatures
if (arg2 == CMD_DYNAMIC_SIGN) {
// Allow the root manager to configure dynamic manageratures
if (arg2 == CMD_DYNAMIC_MANAGER) {
if (!from_root && !from_manager) {
return 0;
}
struct dynamic_sign_user_config config;
struct dynamic_manager_user_config config;
if (copy_from_user(&config, (void __user *)arg3, sizeof(config))) {
pr_err("copy dynamic sign config failed\n");
pr_err("copy dynamic manager config failed\n");
return 0;
}
int ret = ksu_handle_dynamic_sign(&config);
int ret = ksu_handle_dynamic_manager(&config);
if (ret == 0 && config.operation == DYNAMIC_SIGN_OP_GET) {
if (ret == 0 && config.operation == DYNAMIC_MANAGER_OP_GET) {
if (copy_to_user((void __user *)arg3, &config, sizeof(config))) {
pr_err("copy dynamic sign config back failed\n");
pr_err("copy dynamic manager config back failed\n");
return 0;
}
}
if (ret == 0) {
if (copy_to_user(result, &reply_ok, sizeof(reply_ok))) {
pr_err("dynamic_sign: prctl reply error\n");
pr_err("dynamic_manager: prctl reply error\n");
}
}
return 0;
@@ -495,7 +496,7 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
pr_info("post-fs-data triggered\n");
ksu_on_post_fs_data();
// Initializing Dynamic Signatures
ksu_dynamic_sign_init();
ksu_dynamic_manager_init();
pr_info("Dynamic sign config loaded during post-fs-data\n");
}
break;