-
Notifications
You must be signed in to change notification settings - Fork 5
/
taintgrind.h
64 lines (49 loc) · 2.11 KB
/
taintgrind.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* taintgrind.h
*
* Created on: Jun 12, 2012
* Author: khilan
*/
#ifndef TAINTGRIND_H_
#define TAINTGRIND_H_
#include "valgrind.h"
#include <sys/syscall.h>
typedef enum {
VG_USERREQ__TAINTGRIND_CREATE_SANDBOX,
VG_USERREQ__TAINTGRIND_ENTER_PERSISTENT_SANDBOX,
VG_USERREQ__TAINTGRIND_EXIT_PERSISTENT_SANDBOX,
VG_USERREQ__TAINTGRIND_ENTER_EPHEMERAL_SANDBOX,
VG_USERREQ__TAINTGRIND_EXIT_EPHEMERAL_SANDBOX,
VG_USERREQ__TAINTGRIND_SHARED_FD,
VG_USERREQ__TAINTGRIND_SHARED_VAR,
VG_USERREQ__TAINTGRIND_UPDATE_SHARED_VAR,
VG_USERREQ__TAINTGRIND_ALLOW_SYSCALL,
VG_USERREQ__TAINTGRIND_ENTER_CALLGATE,
VG_USERREQ__TAINTGRIND_EXIT_CALLGATE
} Vg_TaintGrindClientRequest;
#define TNT_CREATE_SANDBOX() \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_CREATE_SANDBOX, 0, 0, 0, 0, 0)
#define TNT_ENTER_PERSISTENT_SANDBOX() \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_ENTER_PERSISTENT_SANDBOX, 0, 0, 0, 0, 0)
#define TNT_EXIT_PERSISTENT_SANDBOX() \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_EXIT_PERSISTENT_SANDBOX, 0, 0, 0, 0, 0)
#define TNT_ENTER_EPHEMERAL_SANDBOX() \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_ENTER_EPHEMERAL_SANDBOX, 0, 0, 0, 0, 0)
#define TNT_EXIT_EPHEMERAL_SANDBOX() \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_EXIT_EPHEMERAL_SANDBOX, 0, 0, 0, 0, 0)
#define TNT_SHARED_FD(fd,perm) \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_SHARED_FD, fd, perm, 0, 0, 0)
#define TNT_SHARED_VAR(var,perm) \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_SHARED_VAR, var, perm, 0, 0, 0)
#define TNT_ENTER_CALLGATE() \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_ENTER_CALLGATE, 0, 0, 0, 0, 0)
#define TNT_EXIT_CALLGATE() \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_EXIT_CALLGATE, 0, 0, 0, 0, 0)
#define TNT_UPDATE_SHARED_VAR(var,value) \
{ \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_UPDATE_SHARED_VAR,#var,0,0,0,0); \
var = value; \
}
#define TNT_ALLOW_SYSCALL(syscallno) \
VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__TAINTGRIND_ALLOWSYSCALL,syscallno,0,0,0,0); \
#endif /* TAINTGRIND_H_ */