kernel: backport to 4.19 (#36)

This commit is contained in:
weishu
2023-01-10 23:20:32 +08:00
committed by GitHub
parent 26f80b7107
commit 0e0a812a9c
4 changed files with 42 additions and 6 deletions

View File

@@ -17,6 +17,7 @@
#include <linux/kernel.h>
#include <linux/sched/task_stack.h>
#include <linux/slab.h>
#include <linux/version.h>
#include <asm-generic/errno-base.h>
#include <linux/rcupdate.h>
@@ -245,7 +246,11 @@ static struct kprobe newfstatat_kp = {
};
static struct kprobe execve_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
.symbol_name = "do_execveat_common",
#else
.symbol_name = "__do_execve_file",
#endif
.pre_handler = execve_handler_pre,
};