Commit | Line | Data |
---|---|---|
644d6e9c MD |
1 | #define OVERRIDE_32_execve |
2 | #define OVERRIDE_64_execve | |
e42e81fd MD |
3 | |
4 | #ifndef CREATE_SYSCALL_TABLE | |
5 | ||
644d6e9c | 6 | SC_TRACE_EVENT(execve, |
e17f92ba MD |
7 | TP_PROTO(sc_exit(long ret,) const char *filename, char *const *argv, char *const *envp), |
8 | TP_ARGS(sc_exit(ret,) filename, argv, envp), | |
9 | TP_STRUCT__entry(sc_exit(__field(long, ret)) | |
b75d00c4 MD |
10 | sc_in(__string_from_user(filename, filename)) |
11 | sc_in(__field_hex(char *const *, argv)) | |
12 | sc_in(__field_hex(char *const *, envp))), | |
e17f92ba | 13 | TP_fast_assign(sc_exit(tp_assign(ret, ret)) |
b75d00c4 MD |
14 | sc_in(tp_copy_string_from_user(filename, filename)) |
15 | sc_in(tp_assign(argv, argv)) | |
16 | sc_in(tp_assign(envp, envp))), | |
e42e81fd MD |
17 | TP_printk() |
18 | ) | |
19 | ||
644d6e9c | 20 | SC_TRACE_EVENT(clone, |
e17f92ba | 21 | TP_PROTO(sc_exit(long ret,) unsigned long clone_flags, unsigned long newsp, |
ba21566b | 22 | void __user *parent_tid, |
b5aa4b6a | 23 | void __user *child_tid), |
e17f92ba | 24 | TP_ARGS(sc_exit(ret,) clone_flags, newsp, parent_tid, child_tid), |
ba21566b | 25 | TP_STRUCT__entry( |
e17f92ba | 26 | sc_exit(__field(long, ret)) |
b75d00c4 MD |
27 | sc_in(__field_hex(unsigned long, clone_flags)) |
28 | sc_in(__field_hex(unsigned long, newsp)) | |
29 | sc_in(__field_hex(void *, parent_tid)) | |
30 | sc_in(__field_hex(void *, child_tid))), | |
ba21566b | 31 | TP_fast_assign( |
e17f92ba | 32 | sc_exit(tp_assign(ret, ret)) |
b75d00c4 MD |
33 | sc_in(tp_assign(clone_flags, clone_flags)) |
34 | sc_in(tp_assign(newsp, newsp)) | |
35 | sc_in(tp_assign(parent_tid, parent_tid)) | |
36 | sc_in(tp_assign(child_tid, child_tid))), | |
ba21566b MD |
37 | TP_printk() |
38 | ) | |
39 | ||
b5aa4b6a | 40 | /* present in 32, missing in 64 due to old kernel headers */ |
644d6e9c MD |
41 | #define OVERRIDE_32_getcpu |
42 | #define OVERRIDE_64_getcpu | |
43 | SC_TRACE_EVENT(getcpu, | |
e17f92ba MD |
44 | TP_PROTO(sc_exit(long ret,) unsigned __user *cpup, unsigned __user *nodep, void *tcache), |
45 | TP_ARGS(sc_exit(ret,) cpup, nodep, tcache), | |
b5aa4b6a | 46 | TP_STRUCT__entry( |
e17f92ba | 47 | sc_exit(__field(long, ret)) |
b75d00c4 MD |
48 | sc_out(__field_hex(unsigned *, cpup)) |
49 | sc_out(__field_hex(unsigned *, nodep)) | |
50 | sc_inout(__field_hex(void *, tcache))), | |
b5aa4b6a | 51 | TP_fast_assign( |
e17f92ba | 52 | sc_exit(tp_assign(ret, ret)) |
b75d00c4 MD |
53 | sc_out(tp_assign(cpup, cpup)) |
54 | sc_out(tp_assign(nodep, nodep)) | |
55 | sc_inout(tp_assign(tcache, tcache))), | |
b5aa4b6a MD |
56 | TP_printk() |
57 | ) | |
58 | ||
af44bd3a MD |
59 | #define OVERRIDE_32_pipe |
60 | #define OVERRIDE_64_pipe | |
61 | SC_TRACE_EVENT(pipe, | |
62 | TP_PROTO(sc_exit(long ret,) int * fildes), | |
63 | TP_ARGS(sc_exit(ret,) fildes), | |
64 | TP_STRUCT__entry(sc_exit(__field(long, ret)) | |
65 | sc_out(__array(int, fildes, 2)) | |
66 | ), | |
67 | TP_fast_assign(sc_exit(tp_assign(ret, ret)) | |
68 | sc_out(tp_memcpy_from_user(fildes, fildes, 2)) | |
69 | ), | |
70 | TP_printk() | |
71 | ) | |
72 | ||
73 | #define OVERRIDE_32_pipe2 | |
74 | #define OVERRIDE_64_pipe2 | |
75 | SC_TRACE_EVENT(pipe2, | |
76 | TP_PROTO(sc_exit(long ret,) int * fildes, int flags), | |
77 | TP_ARGS(sc_exit(ret,) fildes, flags), | |
78 | TP_STRUCT__entry(sc_exit(__field(long, ret)) | |
79 | sc_out(__array(int, fildes, 2)) | |
80 | sc_in(__field(int, flags)) | |
81 | ), | |
82 | TP_fast_assign(sc_exit(tp_assign(ret, ret)) | |
83 | sc_out(tp_memcpy_from_user(fildes, fildes, 2)) | |
84 | sc_in(tp_assign(flags, flags)) | |
85 | ), | |
86 | TP_printk() | |
87 | ) | |
88 | ||
e42e81fd | 89 | #endif /* CREATE_SYSCALL_TABLE */ |