kernel: code clean up and some inlining

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
This commit is contained in:
rsuntk
2025-07-22 21:55:49 +07:00
committed by ShirkNeko
parent d2ed7ee19b
commit 7ec07812a1

View File

@@ -76,11 +76,11 @@ void ksu_on_post_fs_data(void)
{
static bool done = false;
if (done) {
pr_info("ksu_on_post_fs_data already done\n");
pr_info("%s already done\n", __func__);
return;
}
done = true;
pr_info("ksu_on_post_fs_data!\n");
pr_info("%s!\n", __func__);
ksu_load_allow_list();
stop_input_hook();
@@ -551,35 +551,15 @@ static int input_handle_event_handler_pre(struct kprobe *p,
return ksu_handle_input_handle_event(type, code, value);
}
#if 1
static struct kprobe execve_kp = {
.symbol_name = SYS_EXECVE_SYMBOL,
.pre_handler = sys_execve_handler_pre,
};
#else
static struct kprobe execve_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
.symbol_name = "do_execveat_common",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
.symbol_name = "__do_execve_file",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
.symbol_name = "do_execveat_common",
#endif
.pre_handler = execve_handler_pre,
};
#endif
#if 1
static struct kprobe vfs_read_kp = {
.symbol_name = SYS_READ_SYMBOL,
.pre_handler = sys_read_handler_pre,
};
#else
static struct kprobe vfs_read_kp = {
.symbol_name = "vfs_read",
.pre_handler = vfs_read_handler_pre,
};
#endif
static struct kprobe input_event_kp = {
.symbol_name = "input_event",