-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathselix_trace_provider.h
More file actions
61 lines (54 loc) · 1.75 KB
/
selix_trace_provider.h
File metadata and controls
61 lines (54 loc) · 1.75 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
49
50
51
52
53
54
55
56
57
58
59
60
61
#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER PHP_selix
#undef TRACEPOINT_INCLUDE_FILE
#define TRACEPOINT_INCLUDE_FILE ./selix_trace_provider.h
#if !defined(_PHP_SELIX_PROVIDER_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
#define _PHP_SELIX_PROVIDER_H
#include <lttng/tracepoint.h>
/* Tracepoints */
TRACEPOINT_EVENT( PHP_selix, check_read_permission,
TP_ARGS(const char *, type, const char *, fname, char *, opened),
TP_FIELDS(
ctf_string(type, type)
ctf_string(path, fname)
ctf_string(opened_path, opened)
)
)
TRACEPOINT_EVENT( PHP_selix, read_security_context,
TP_ARGS(const char *, name, const char *, value),
TP_FIELDS(
ctf_string(attribute, name)
ctf_string(value, value)
)
)
TRACEPOINT_EVENT( PHP_selix, security_context_change,
TP_ARGS(const char *, newctx, const char *, oldctx),
TP_FIELDS(
ctf_string(new, newctx)
ctf_string(old, oldctx)
)
)
TRACEPOINT_EVENT( PHP_selix, zend_execute,
TP_ARGS(const char *, fname, zend_uint, lineno, zend_bool, exec),
TP_FIELDS(
ctf_string(path, fname)
ctf_integer(zend_uint, line, lineno)
ctf_integer(zend_bool, in_execution, exec)
)
)
TRACEPOINT_EVENT( PHP_selix, zend_compile_file,
TP_ARGS(const char *, fname, char *, opened, zend_bool, exec),
TP_FIELDS(
ctf_string(path, fname)
ctf_string(opened_path, opened)
ctf_integer(zend_bool, in_execution, exec)
)
)
/* Log levels */
TRACEPOINT_LOGLEVEL( PHP_selix, check_read_permission, TRACE_DEBUG_FUNCTION)
TRACEPOINT_LOGLEVEL( PHP_selix, read_security_context, TRACE_DEBUG_MODULE)
TRACEPOINT_LOGLEVEL( PHP_selix, security_context_change, TRACE_DEBUG_FUNCTION)
TRACEPOINT_LOGLEVEL( PHP_selix, zend_execute, TRACE_DEBUG_FUNCTION)
TRACEPOINT_LOGLEVEL( PHP_selix, zend_compile_file, TRACE_DEBUG_FUNCTION)
#endif
#include <lttng/tracepoint-event.h>