kernel: support query working mode

This commit is contained in:
weishu
2024-03-19 11:41:05 +08:00
parent 99847cb986
commit ce0c397a65

View File

@@ -324,6 +324,14 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
if (copy_to_user(arg3, &version, sizeof(version))) {
pr_err("prctl reply error, cmd: %lu\n", arg2);
}
#ifdef MODULE
u32 is_lkm = 0x1;
#else
u32 is_lkm = 0x0;
#endif
if (arg4 && copy_to_user(arg4, &is_lkm, sizeof(is_lkm))) {
pr_err("prctl reply error, cmd: %lu\n", arg2);
}
}
return 0;
}