aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-18 17:39:15 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-18 17:39:15 +0300
commitf9e23e6e41068d63d42f950941c3d2fc155ef21c (patch)
treef548be5eab98389108dbd52b69eae413800405da /tests
parentf952391ee86f42d7606b2d3791931aba746a7aca (diff)
downloadkmi-f9e23e6e41068d63d42f950941c3d2fc155ef21c.tar.gz
kmi-f9e23e6e41068d63d42f950941c3d2fc155ef21c.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/common/test.h6
1 files changed, 6 insertions, 0 deletions
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)