Pass implicit PID into syscalls

This commit is contained in:
2025-10-18 12:10:59 +02:00
parent d1d777ec75
commit a5fe64b253
15 changed files with 56 additions and 34 deletions

View File

@ -9,6 +9,7 @@
#define SYSCALL0(name) \
name(UNUSED IntrStackFrame *frame, \
UNUSED uint64_t _caller_pid, \
UNUSED uint64_t _1, \
UNUSED uint64_t _2, \
UNUSED uint64_t _3, \
@ -19,6 +20,7 @@
#define SYSCALL1(name, arg1) \
name(UNUSED IntrStackFrame *frame, \
UNUSED uint64_t _caller_pid, \
uint64_t arg1, \
UNUSED uint64_t _2, \
UNUSED uint64_t _3, \
@ -29,6 +31,7 @@
#define SYSCALL2(name, arg1, arg2) \
name(UNUSED IntrStackFrame *frame, \
UNUSED uint64_t _caller_pid, \
uint64_t arg1, \
uint64_t arg2, \
UNUSED uint64_t _3, \
@ -39,6 +42,7 @@
#define SYSCALL3(name, arg1, arg2, arg3) \
name(UNUSED IntrStackFrame *frame, \
UNUSED uint64_t _caller_pid, \
uint64_t arg1, \
uint64_t arg2, \
uint64_t arg3, \
@ -49,6 +53,7 @@
#define SYSCALL4(name, arg1, arg2, arg3, arg4) \
name(UNUSED IntrStackFrame *frame, \
UNUSED uint64_t _caller_pid, \
uint64_t arg1, \
uint64_t arg2, \
uint64_t arg3, \
@ -59,6 +64,7 @@
#define SYSCALL5(name, arg1, arg2, arg3, arg4, arg5) \
name(UNUSED IntrStackFrame *frame, \
UNUSED uint64_t _caller_pid, \
uint64_t arg1, \
uint64_t arg2, \
uint64_t arg3, \
@ -69,6 +75,7 @@
#define SYSCALL6(name, arg1, arg2, arg3, arg4, arg5, arg6) \
name(UNUSED IntrStackFrame *frame, \
UNUSED uint64_t _caller_pid, \
uint64_t arg1, \
uint64_t arg2, \
uint64_t arg3, \
@ -77,7 +84,13 @@
uint64_t arg6 \
)
typedef int32_t (*SyscallFn)(IntrStackFrame *, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);
typedef int32_t (*SyscallFn)(IntrStackFrame *, uint64_t,
uint64_t,
uint64_t,
uint64_t,
uint64_t,
uint64_t,
uint64_t);
extern SyscallFn SYSCALL_TABLE[SYSCALLS_MAX];