From 90d17ab8980674c6a59f47a062adccb37f99b88a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 16 Apr 2020 17:38:36 +0200 Subject: prog: introduce call attributes Add common infrastructure for syscall attributes. Add few attributes we want, but they are not implemented for now (don't affect behavior, this will follow). --- executor/executor.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'executor/executor.cc') diff --git a/executor/executor.cc b/executor/executor.cc index 084bb5736..633f65606 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -172,6 +172,7 @@ typedef intptr_t(SYSCALLAPI* syscall_t)(intptr_t, intptr_t, intptr_t, intptr_t, struct call_t { const char* name; int sys_nr; + call_attrs_t attrs; syscall_t call; }; @@ -686,6 +687,9 @@ retry: // Normal syscall. if (call_num >= ARRAY_SIZE(syscalls)) fail("invalid command number %llu", call_num); + const call_t* call = &syscalls[call_num]; + if (call->attrs.disabled) + fail("executing disabled syscall %s", call->name); // call_extra_timeout must match timeout in pkg/csource/csource.go. int call_extra_timeout = 0; // TODO: find a way to tune timeout values. -- cgit mrf-deployment