| 1 | #define OVERRIDE_32_sys_execve |
| 2 | #define OVERRIDE_64_sys_execve |
| 3 | |
| 4 | #ifndef CREATE_SYSCALL_TABLE |
| 5 | |
| 6 | SC_TRACE_EVENT(sys_execve, |
| 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)) |
| 10 | __string_from_user(filename, filename) |
| 11 | __field_hex(char *const *, argv) |
| 12 | __field_hex(char *const *, envp)), |
| 13 | TP_fast_assign(sc_exit(tp_assign(ret, ret)) |
| 14 | tp_copy_string_from_user(filename, filename) |
| 15 | tp_assign(argv, argv) |
| 16 | tp_assign(envp, envp)), |
| 17 | TP_printk() |
| 18 | ) |
| 19 | |
| 20 | SC_TRACE_EVENT(sys_clone, |
| 21 | TP_PROTO(sc_exit(long ret,) unsigned long clone_flags, unsigned long newsp, |
| 22 | void __user *parent_tid, |
| 23 | void __user *child_tid), |
| 24 | TP_ARGS(sc_exit(ret,) clone_flags, newsp, parent_tid, child_tid), |
| 25 | TP_STRUCT__entry( |
| 26 | sc_exit(__field(long, ret)) |
| 27 | __field_hex(unsigned long, clone_flags) |
| 28 | __field_hex(unsigned long, newsp) |
| 29 | __field_hex(void *, parent_tid) |
| 30 | __field_hex(void *, child_tid)), |
| 31 | TP_fast_assign( |
| 32 | sc_exit(tp_assign(ret, ret)) |
| 33 | tp_assign(clone_flags, clone_flags) |
| 34 | tp_assign(newsp, newsp) |
| 35 | tp_assign(parent_tid, parent_tid) |
| 36 | tp_assign(child_tid, child_tid)), |
| 37 | TP_printk() |
| 38 | ) |
| 39 | |
| 40 | /* present in 32, missing in 64 due to old kernel headers */ |
| 41 | #define OVERRIDE_32_sys_getcpu |
| 42 | #define OVERRIDE_64_sys_getcpu |
| 43 | SC_TRACE_EVENT(sys_getcpu, |
| 44 | TP_PROTO(sc_exit(long ret,) unsigned __user *cpup, unsigned __user *nodep, void *tcache), |
| 45 | TP_ARGS(sc_exit(ret,) cpup, nodep, tcache), |
| 46 | TP_STRUCT__entry( |
| 47 | sc_exit(__field(long, ret)) |
| 48 | __field_hex(unsigned *, cpup) |
| 49 | __field_hex(unsigned *, nodep) |
| 50 | __field_hex(void *, tcache)), |
| 51 | TP_fast_assign( |
| 52 | sc_exit(tp_assign(ret, ret)) |
| 53 | tp_assign(cpup, cpup) |
| 54 | tp_assign(nodep, nodep) |
| 55 | tp_assign(tcache, tcache)), |
| 56 | TP_printk() |
| 57 | ) |
| 58 | |
| 59 | #endif /* CREATE_SYSCALL_TABLE */ |