From f9e23e6e41068d63d42f950941c3d2fc155ef21c Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 18 Jul 2024 17:39:15 +0300 Subject: add ipc_tail() + ipc_kick() does a forward and a tail at the same time The idea with ipc_tail() is to allow 'trusted' calls, so for example a process is not allowed to willy-nilly open a file, as it has to go via init(), making the eid 1. This way the receiver can know that the request has gone through init() and can open up a new connection (file, whatever) after which requests from that pid/tid are allowed without init() intervention --- tests/common/test.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/common') diff --git a/tests/common/test.h b/tests/common/test.h index 3b591e0..40e3622 100644 --- a/tests/common/test.h +++ b/tests/common/test.h @@ -165,6 +165,12 @@ static inline id_t sys_req_abs_timer(uint64_t ticks) #define sys_ipc_fwd3(pid, d0, d1, d2) syscall4(SYS_IPC_FWD, pid, d0, d1, d2) #define sys_ipc_fwd4(pid, d0, d1, d2, d3) syscall5(SYS_IPC_FWD, pid, d0, d1, d2, d3) +#define sys_ipc_tail0(pid) syscall1(SYS_IPC_TAIL, pid) +#define sys_ipc_tail1(pid, d0) syscall2(SYS_IPC_TAIL, pid, d0) +#define sys_ipc_tail2(pid, d0, d1) syscall3(SYS_IPC_TAIL, pid, d0, d1) +#define sys_ipc_tail3(pid, d0, d1, d2) syscall4(SYS_IPC_TAIL, pid, d0, d1, d2) +#define sys_ipc_tail4(pid, d0, d1, d2, d3) syscall5(SYS_IPC_TAIL, pid, d0, d1, d2, d3) + #define sys_ipc_kick0(pid) syscall1(SYS_IPC_KICK, pid) #define sys_ipc_kick1(pid, d0) syscall2(SYS_IPC_KICK, pid, d0) #define sys_ipc_kick2(pid, d0, d1) syscall3(SYS_IPC_KICK, pid, d0, d1) -- cgit v1.3