System call inout/output arg processing
[lttng-modules.git] / instrumentation / syscalls / headers / syscalls_pointers_override.h
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 sc_in(__string_from_user(filename, filename))
11 sc_in(__field_hex(char *const *, argv))
12 sc_in(__field_hex(char *const *, envp))),
13 TP_fast_assign(sc_exit(tp_assign(ret, ret))
14 sc_in(tp_copy_string_from_user(filename, filename))
15 sc_in(tp_assign(argv, argv))
16 sc_in(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 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))),
31 TP_fast_assign(
32 sc_exit(tp_assign(ret, ret))
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))),
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 sc_out(__field_hex(unsigned *, cpup))
49 sc_out(__field_hex(unsigned *, nodep))
50 sc_inout(__field_hex(void *, tcache))),
51 TP_fast_assign(
52 sc_exit(tp_assign(ret, ret))
53 sc_out(tp_assign(cpup, cpup))
54 sc_out(tp_assign(nodep, nodep))
55 sc_inout(tp_assign(tcache, tcache))),
56 TP_printk()
57 )
58
59 #endif /* CREATE_SYSCALL_TABLE */
This page took 0.030645 seconds and 4 git commands to generate.