From 6a7073e5f262db9a4578ff00b5b28e34335564ce Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 23 May 2024 19:54:55 +0300 Subject: 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 --- common/uapi/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/uapi') 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)) { -- cgit v1.3