From 17268b5c008ad4fccc3c48eb6db90b9888600d61 Mon Sep 17 00:00:00 2001 From: weishu Date: Sat, 7 Jan 2023 20:07:13 +0700 Subject: [PATCH] kernel: syscall_work is introduced above 5.10 --- kernel/ksu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/ksu.c b/kernel/ksu.c index 442e579e..51f02b73 100644 --- a/kernel/ksu.c +++ b/kernel/ksu.c @@ -1,5 +1,5 @@ -#include "linux/gfp.h" -#include "linux/uidgid.h" +#include +#include #include #include #include @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -59,7 +60,7 @@ void escape_to_root() memset(&cred->cap_ambient, 0xff, sizeof(cred->cap_ambient)); // disable seccomp -#ifdef CONFIG_GENERIC_ENTRY +#if defined(CONFIG_GENERIC_ENTRY) && LINUX_VERSION_CODE > KERNEL_VERSION(5, 10, 0) current_thread_info()->syscall_work &= ~SYSCALL_WORK_SECCOMP; #else current_thread_info()->flags &= ~(TIF_SECCOMP | _TIF_SECCOMP);