| 1 | /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */ |
| 2 | |
| 3 | #if !defined(_TRACE_SYSCALLS_UNKNOWN_H) || defined(TRACE_HEADER_MULTI_READ) |
| 4 | #define _TRACE_SYSCALLS_UNKNOWN_H |
| 5 | |
| 6 | #include <lttng/tracepoint-event.h> |
| 7 | #include <linux/syscalls.h> |
| 8 | |
| 9 | #define UNKNOWN_SYSCALL_NRARGS 6 |
| 10 | |
| 11 | #undef TP_PROBE_CB |
| 12 | #define TP_PROBE_CB(_template) &syscall_entry_event_probe |
| 13 | |
| 14 | LTTNG_TRACEPOINT_EVENT(syscall_entry_unknown, |
| 15 | TP_PROTO(int id, unsigned long *args), |
| 16 | TP_ARGS(id, args), |
| 17 | TP_FIELDS( |
| 18 | ctf_integer(int, id, id) |
| 19 | ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS) |
| 20 | ) |
| 21 | ) |
| 22 | LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_unknown, |
| 23 | TP_PROTO(int id, unsigned long *args), |
| 24 | TP_ARGS(id, args), |
| 25 | TP_FIELDS( |
| 26 | ctf_integer(int, id, id) |
| 27 | ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS) |
| 28 | ) |
| 29 | ) |
| 30 | |
| 31 | #undef TP_PROBE_CB |
| 32 | #define TP_PROBE_CB(_template) &syscall_exit_event_probe |
| 33 | |
| 34 | LTTNG_TRACEPOINT_EVENT(syscall_exit_unknown, |
| 35 | TP_PROTO(int id, long ret, unsigned long *args), |
| 36 | TP_ARGS(id, ret, args), |
| 37 | TP_FIELDS( |
| 38 | ctf_integer(int, id, id) |
| 39 | ctf_integer(long, ret, ret) |
| 40 | ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS) |
| 41 | ) |
| 42 | ) |
| 43 | LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_unknown, |
| 44 | TP_PROTO(int id, long ret, unsigned long *args), |
| 45 | TP_ARGS(id, ret, args), |
| 46 | TP_FIELDS( |
| 47 | ctf_integer(int, id, id) |
| 48 | ctf_integer(long, ret, ret) |
| 49 | ctf_array(unsigned long, args, args, UNKNOWN_SYSCALL_NRARGS) |
| 50 | ) |
| 51 | ) |
| 52 | #endif /* _TRACE_SYSCALLS_UNKNOWN_H */ |
| 53 | |
| 54 | /* This part must be outside protection */ |
| 55 | #include <lttng/define_trace.h> |