forked from roba269/wai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyscalls.h
More file actions
48 lines (46 loc) · 1.03 KB
/
syscalls.h
File metadata and controls
48 lines (46 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef SYSCALLS_H
#define SYSCALLS_H
#include <unistd.h>
#include <limits.h>
#include <sys/syscall.h>
struct SyscallSpec {
int number, limit;
};
#ifdef __x86_64__
// FIXME: the sys calls in 64 bit OS is not well tested
const static SyscallSpec g_spec[] = {
{SYS_write, INT_MAX},
{SYS_read, INT_MAX},
{SYS_brk, INT_MAX},
{SYS_access, INT_MAX},
{SYS_mmap, INT_MAX},
{SYS_munmap, INT_MAX},
{SYS_execve, 1},
{SYS_fstat, INT_MAX},
{SYS_arch_prctl, 1},
{SYS_uname, 1},
{SYS_gettimeofday, INT_MAX},
{SYS_getrusage, INT_MAX},
{SYS_time, INT_MAX},
{-1, 0}
};
#else
const static SyscallSpec g_spec[] = {
{SYS_write, INT_MAX},
{SYS_read, INT_MAX},
{SYS_brk, INT_MAX},
{SYS_access, INT_MAX},
{SYS_mmap2, INT_MAX},
{SYS_munmap, INT_MAX},
{SYS_set_thread_area, 1},
{SYS_fstat64, INT_MAX},
{SYS_uname, 1},
{SYS_execve, 1},
{SYS_getpid, INT_MAX},
{SYS_gettimeofday, INT_MAX},
{SYS_getrusage, INT_MAX},
{SYS_time, INT_MAX},
{-1, 0}
};
#endif
#endif