>From 8622064afadb81ace04dcb1f8597b37e86f23084 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 20:50:17 +0000 Subject: [PATCH 02/17] sys/prctl.h: add PR_SET_SYSCALL_USER_DISPATCH from linux v5.11 see linux commit 1446e1df9eb183fdf81c3f0715402f1d7595d4cb kernel: Implement selective syscall userspace redirection linux commit 36a6c843fd0d8e02506681577e96dabd203dd8e8 entry: Use different define for selector variable in SUD redirect syscalls to a userspace handler via SIGSYS, except for a specific range of code. can be toggled via a memory write to a selector variable. mainly for wine. --- include/sys/prctl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sys/prctl.h b/include/sys/prctl.h index 4ba73f42..3f0254c7 100644 --- a/include/sys/prctl.h +++ b/include/sys/prctl.h @@ -168,6 +168,12 @@ struct prctl_mm_map { #define PR_SET_IO_FLUSHER 57 #define PR_GET_IO_FLUSHER 58 +#define PR_SET_SYSCALL_USER_DISPATCH 59 +#define PR_SYS_DISPATCH_OFF 0 +#define PR_SYS_DISPATCH_ON 1 +#define SYSCALL_DISPATCH_FILTER_ALLOW 0 +#define SYSCALL_DISPATCH_FILTER_BLOCK 1 + int prctl (int, ...); #ifdef __cplusplus -- 2.31.1