diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-04-16 17:38:36 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-04-19 10:26:57 +0200 |
| commit | 90d17ab8980674c6a59f47a062adccb37f99b88a (patch) | |
| tree | 63c96e2abc46f63d9092f07b16c8e70458b11444 /executor/executor.cc | |
| parent | 0781895e0f8359843b9215ac6ad16925a46b2703 (diff) | |
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).
Diffstat (limited to 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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. |
