kernel: use syscall hook for all version, remove code next version if works well
This commit is contained in:
@@ -532,7 +532,7 @@ static int input_handle_event_handler_pre(struct kprobe *p,
|
|||||||
return ksu_handle_input_handle_event(type, code, value);
|
return ksu_handle_input_handle_event(type, code, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#if 1
|
||||||
static struct kprobe execve_kp = {
|
static struct kprobe execve_kp = {
|
||||||
.symbol_name = SYS_EXECVE_SYMBOL,
|
.symbol_name = SYS_EXECVE_SYMBOL,
|
||||||
.pre_handler = sys_execve_handler_pre,
|
.pre_handler = sys_execve_handler_pre,
|
||||||
@@ -550,7 +550,7 @@ static struct kprobe execve_kp = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#if 1
|
||||||
static struct kprobe vfs_read_kp = {
|
static struct kprobe vfs_read_kp = {
|
||||||
.symbol_name = SYS_READ_SYMBOL,
|
.symbol_name = SYS_READ_SYMBOL,
|
||||||
.pre_handler = sys_read_handler_pre,
|
.pre_handler = sys_read_handler_pre,
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ static int sys_execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
|
|||||||
return ksu_handle_execve_sucompat(AT_FDCWD, filename_user, NULL, NULL, NULL);
|
return ksu_handle_execve_sucompat(AT_FDCWD, filename_user, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#if 1
|
||||||
static struct kprobe faccessat_kp = {
|
static struct kprobe faccessat_kp = {
|
||||||
.symbol_name = SYS_FACCESSAT_SYMBOL,
|
.symbol_name = SYS_FACCESSAT_SYMBOL,
|
||||||
.pre_handler = sys_faccessat_handler_pre,
|
.pre_handler = sys_faccessat_handler_pre,
|
||||||
@@ -257,7 +257,7 @@ static struct kprobe faccessat_kp = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#if 1
|
||||||
static struct kprobe newfstatat_kp = {
|
static struct kprobe newfstatat_kp = {
|
||||||
.symbol_name = SYS_NEWFSTATAT_SYMBOL,
|
.symbol_name = SYS_NEWFSTATAT_SYMBOL,
|
||||||
.pre_handler = sys_newfstatat_handler_pre,
|
.pre_handler = sys_newfstatat_handler_pre,
|
||||||
@@ -273,7 +273,7 @@ static struct kprobe newfstatat_kp = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
#if 1
|
||||||
static struct kprobe execve_kp = {
|
static struct kprobe execve_kp = {
|
||||||
.symbol_name = SYS_EXECVE_SYMBOL,
|
.symbol_name = SYS_EXECVE_SYMBOL,
|
||||||
.pre_handler = sys_execve_handler_pre,
|
.pre_handler = sys_execve_handler_pre,
|
||||||
|
|||||||
Reference in New Issue
Block a user