aboutsummaryrefslogtreecommitdiff
path: root/common/uapi
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-05-23 19:54:55 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-05-23 19:59:39 +0300
commit6a7073e5f262db9a4578ff00b5b28e34335564ce (patch)
tree38294048ff12b2abc6fc9c2fe967eae9d7b8c3b7 /common/uapi
parentc18ec832ed592e4c6171139a8aaadde827cb13da (diff)
downloadkmi-6a7073e5f262db9a4578ff00b5b28e34335564ce.tar.gz
kmi-6a7073e5f262db9a4578ff00b5b28e34335564ce.zip
improve id handling
+ The number of allowed threads running at the same time is limited to num_tids, but each thread's ID can be any larger than that. This should make ID reuse a lot more rare, and probably makes certain kinds of time-of-check-to-time-of-use attacks more difficult
Diffstat (limited to 'common/uapi')
-rw-r--r--common/uapi/ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/uapi/ipc.c b/common/uapi/ipc.c
index 18c3b1a..cb2ce28 100644
--- a/common/uapi/ipc.c
+++ b/common/uapi/ipc.c
@@ -216,7 +216,7 @@ static void do_ipc(struct tcb *t,
if (unlikely(!enough_rpc_stack(t)))
return_args1(t, ERR_OOMEM);
- vm_t s = enter_rpc(t, SYS_RET6(OK, t->eid, d0, d1, d2, d3), kind);
+ vm_t s = enter_rpc(t, SYS_RET6(t->eid, t->tid, d0, d1, d2, d3), kind);
struct tcb *r = get_tcb(pid);
if (unlikely(!r)) {