X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=instrumentation%2Fsyscalls%2Fheaders%2Fsyscalls_pointers_override.h;h=184f3a96e8c08b0b0604999531e17f70af817e56;hb=639655f9b4c42d3e82a7e69afbae8d26e69f9be3;hp=d116052fbfeca19973712c5a179fb4040b004f74;hpb=29751f7ce6ed098d4181309b4cf977e837fad526;p=lttng-modules.git diff --git a/instrumentation/syscalls/headers/syscalls_pointers_override.h b/instrumentation/syscalls/headers/syscalls_pointers_override.h index d116052f..184f3a96 100644 --- a/instrumentation/syscalls/headers/syscalls_pointers_override.h +++ b/instrumentation/syscalls/headers/syscalls_pointers_override.h @@ -225,7 +225,7 @@ end: ; /* Label at end of compound statement. */ \ kfree(tp_locvar->fds_out); \ kfree(tp_locvar->fds_ex); -#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) #define OVERRIDE_32_select #define OVERRIDE_64_select SC_LTTNG_TRACEPOINT_EVENT_CODE(select, @@ -260,7 +260,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(select, LTTNG_SYSCALL_SELECT_code_post ) ) -#endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) */ +#endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) */ #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) #define OVERRIDE_32_pselect6 @@ -300,4 +300,591 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(pselect6, ) #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */ +#ifndef ONCE_LTTNG_TRACE_POLL_H +#define ONCE_LTTNG_TRACE_POLL_H + +#define LTTNG_POLL_NRFLAGS (POLLNVAL + 1) +#define POLL_FLAGS_PADDING_SIZE (sizeof(uint8_t) * BITS_PER_BYTE) - \ + ilog2(LTTNG_POLL_NRFLAGS - 1) + +/* + * Only extract the values specified by iBCS2 for now. + */ +static struct lttng_event_field lttng_pollfd_flag_fields[] = { + [ilog2(POLLIN)] = { + .name = "POLLIN", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + [ilog2(POLLPRI)] = { + .name = "POLLPRI", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + [ilog2(POLLOUT)] = { + .name = "POLLOUT", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + [ilog2(POLLERR)] = { + .name = "POLLERR", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + [ilog2(POLLHUP)] = { + .name = "POLLHUP", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + [ilog2(POLLNVAL)] = { + .name = "POLLNVAL", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + [ilog2(LTTNG_POLL_NRFLAGS)] = { + .name = "padding", + .type = __type_integer(int, POLL_FLAGS_PADDING_SIZE, 1, 0, + __LITTLE_ENDIAN, 10, none), + }, +}; + +static struct lttng_event_field lttng_pollfd_fields[] = { + [0] = { + .name = "fd", + .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 10, none), + }, + [1] = { + .name = "raw_events", + .type = __type_integer(short, 0, 0, 0, __BYTE_ORDER, 16, none), + }, + [2] = { + .name = "events", + .type = { + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(lttng_pollfd_flag_fields), + .u._struct.fields = lttng_pollfd_flag_fields, + } + }, +}; + +static struct lttng_type lttng_pollfd_elem = { + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(lttng_pollfd_fields), + .u._struct.fields = lttng_pollfd_fields, +}; +#endif /* ONCE_LTTNG_TRACE_POLL_H */ + +#define LTTNG_SYSCALL_POLL_locvar \ + unsigned int fds_length, fds_max_len, alloc_fds; \ + struct pollfd *fds; \ + uint8_t overflow; + +#define LTTNG_SYSCALL_POLL_code_pre \ + BUILD_BUG_ON(((ARRAY_SIZE(lttng_pollfd_flag_fields) - 1) + \ + POLL_FLAGS_PADDING_SIZE) != \ + sizeof(uint8_t) * BITS_PER_BYTE); \ + tp_locvar->fds = NULL; \ + tp_locvar->overflow = 0; \ + \ + sc_in( \ + if (nfds > PAGE_SIZE / sizeof(struct pollfd)) { \ + tp_locvar->fds_length = PAGE_SIZE / sizeof(struct pollfd); \ + tp_locvar->fds_max_len = PAGE_SIZE / sizeof(struct pollfd); \ + tp_locvar->overflow = 1; \ + } else { \ + tp_locvar->fds_length = nfds; \ + tp_locvar->fds_max_len = nfds; \ + } \ + tp_locvar->alloc_fds = tp_locvar->fds_length * sizeof(struct pollfd); \ + ) \ + /* \ + * On exit, the number of active FDs is determined by ret, \ + * nfds stays the same as the entry, but we only want to \ + * output the FDs that are relevant. \ + */ \ + sc_out( \ + if (ret <= 0 || ret > nfds) \ + goto error; \ + \ + if (nfds > PAGE_SIZE / sizeof(struct pollfd)) { \ + tp_locvar->fds_length = PAGE_SIZE / sizeof(struct pollfd); \ + tp_locvar->fds_max_len = PAGE_SIZE / sizeof(struct pollfd); \ + tp_locvar->overflow = 1; \ + } else { \ + tp_locvar->fds_length = ret; \ + tp_locvar->fds_max_len = nfds; \ + } \ + tp_locvar->alloc_fds = tp_locvar->fds_max_len * sizeof(struct pollfd); \ + ) \ + { \ + int err; \ + \ + tp_locvar->fds = kmalloc(tp_locvar->alloc_fds, \ + GFP_ATOMIC | GFP_NOWAIT); \ + if (!tp_locvar->fds) \ + goto error; \ + err = lib_ring_buffer_copy_from_user_check_nofault( \ + tp_locvar->fds, ufds, tp_locvar->alloc_fds); \ + if (err != 0) \ + goto error; \ + } \ + goto end; \ + \ +error: \ + tp_locvar->fds_length = 0; \ + tp_locvar->fds_max_len = 0; \ +end: \ + ; + +#define LTTNG_SYSCALL_POLL_fds_field \ + sc_in( \ + ctf_custom_field( \ + ctf_custom_type( \ + .atype = atype_sequence_compound, \ + .u.sequence_compound.length_name = "fds_length", \ + .u.sequence_compound.elem_type = <tng_pollfd_elem, \ + ), \ + fds, \ + ctf_custom_code( \ + uint32_t i; \ + \ + ctf_align(int) /* Align on largest field in struct. */ \ + for (i = 0; i < tp_locvar->fds_length; i++) { \ + ctf_integer_type(int, tp_locvar->fds[i].fd) \ + ctf_integer_type(short, tp_locvar->fds[i].events) \ + ctf_integer_bitfield_type(uint8_t, \ + (uint8_t) tp_locvar->fds[i].events) \ + } \ + ) \ + ) \ + ) \ + sc_out( \ + ctf_custom_field( \ + ctf_custom_type( \ + .atype = atype_sequence_compound, \ + .u.sequence_compound.length_name = "fds_length", \ + .u.sequence_compound.elem_type = <tng_pollfd_elem, \ + ), \ + fds, \ + ctf_custom_code( \ + unsigned int i, nr = 0; \ + \ + ctf_align(int) /* Align on largest field in struct. */ \ + /* \ + * Iterate over the complete array, but only output \ + * "ret" active FDs. \ + */ \ + for (i = 0; i < tp_locvar->fds_max_len; i++) { \ + if (!tp_locvar->fds[i].revents) \ + continue; \ + if (nr++ >= tp_locvar->fds_length) \ + break; \ + ctf_integer_type(int, tp_locvar->fds[i].fd) \ + ctf_integer_type(short, tp_locvar->fds[i].revents) \ + ctf_integer_bitfield_type(uint8_t, \ + (uint8_t) tp_locvar->fds[i].revents) \ + } \ + /* \ + * If there is a discrepancy between ret and the \ + * content of revents (e.g. caused by userspace corrupting \ + * the array from a concurrent thread), we have to output \ + * zeros to keep the trace readable. \ + */ \ + for (i = nr; i < tp_locvar->fds_length; i++) { \ + ctf_integer_type(int, 0) \ + ctf_integer_type(short, 0) \ + ctf_integer_bitfield_type(uint8_t, 0) \ + } \ + ) \ + ) \ + ) + +#define LTTNG_SYSCALL_POLL_code_post \ + kfree(tp_locvar->fds); + +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) +#define OVERRIDE_32_poll +#define OVERRIDE_64_poll +SC_LTTNG_TRACEPOINT_EVENT_CODE(poll, + TP_PROTO(sc_exit(long ret,) struct pollfd __user * ufds, + unsigned int nfds, int timeout_msecs), + TP_ARGS(sc_exit(ret,) ufds, nfds, timeout_msecs), + TP_locvar( + LTTNG_SYSCALL_POLL_locvar + ), + TP_code_pre( + LTTNG_SYSCALL_POLL_code_pre + ), + TP_FIELDS( + sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, timeout_msecs, timeout_msecs)) + sc_inout(ctf_integer(unsigned int, nfds, nfds)) + sc_inout(ctf_integer(unsigned int, fds_length, tp_locvar->fds_length)) + sc_in(ctf_integer(uint8_t, overflow, tp_locvar->overflow)) + LTTNG_SYSCALL_POLL_fds_field + ), + TP_code_post( + LTTNG_SYSCALL_POLL_code_post + ) +) +#endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) */ + +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) +#define OVERRIDE_32_ppoll +#define OVERRIDE_64_ppoll +SC_LTTNG_TRACEPOINT_EVENT_CODE(ppoll, + TP_PROTO(sc_exit(long ret,) struct pollfd __user * ufds, + unsigned int nfds, struct timespec * tsp, const sigset_t * sigmask, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) ufds, nfds, tsp, sigmask, sigsetsize), + TP_locvar( + LTTNG_SYSCALL_POLL_locvar + ), + TP_code_pre( + LTTNG_SYSCALL_POLL_code_pre + ), + TP_FIELDS( + sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(struct timespec *, tsp, tsp)) + sc_in(ctf_integer(const sigset_t *, sigmask, sigmask)) + sc_in(ctf_integer(size_t, sigsetsize, sigsetsize)) + sc_inout(ctf_integer(unsigned int, nfds, nfds)) + sc_inout(ctf_integer(unsigned int, fds_length, tp_locvar->fds_length)) + sc_inout(ctf_integer(uint8_t, overflow, tp_locvar->overflow)) + LTTNG_SYSCALL_POLL_fds_field + ), + TP_code_post( + LTTNG_SYSCALL_POLL_code_post + ) +) +#endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */ + +#include + +SC_LTTNG_TRACEPOINT_ENUM(lttng_epoll_op, + TP_ENUM_VALUES( + ctf_enum_value("EPOLL_CTL_ADD", EPOLL_CTL_ADD) + ctf_enum_value("EPOLL_CTL_DEL", EPOLL_CTL_DEL) + ctf_enum_value("EPOLL_CTL_MOD", EPOLL_CTL_MOD) + ) +) + +#ifndef ONCE_LTTNG_TRACE_EPOLL_CTL_H +#define ONCE_LTTNG_TRACE_EPOLL_CTL_H + +#define LTTNG_EPOLL_NRFLAGS (POLLHUP + 1) +#define EPOLL_FLAGS_PADDING_SIZE (sizeof(uint8_t) * BITS_PER_BYTE) - \ + ilog2(LTTNG_EPOLL_NRFLAGS - 1) + +/* + * Only extract the values specified by iBCS2 for now. + */ +static struct lttng_event_field lttng_epoll_ctl_events_fields[] = { + /* 0x0001 */ + [ilog2(POLLIN)] = { + .name = "EPOLLIN", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + /* 0x0002 */ + [ilog2(POLLPRI)] = { + .name = "EPOLLPRI", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + /* 0x0004 */ + [ilog2(POLLOUT)] = { + .name = "EPOLLOUT", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + /* 0x0008 */ + [ilog2(POLLERR)] = { + .name = "EPOLLERR", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + /* 0x0010 */ + [ilog2(POLLHUP)] = { + .name = "EPOLLHUP", + .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none), + }, + [ilog2(LTTNG_EPOLL_NRFLAGS)] = { + .name = "padding", + .type = __type_integer(int, EPOLL_FLAGS_PADDING_SIZE, 1, 0, + __LITTLE_ENDIAN, 10, none), + }, + +}; + +static struct lttng_event_field lttng_epoll_data_fields[] = { + [0] = { + .name = "u64", + .type = __type_integer(uint64_t, 0, 0, 0, __BYTE_ORDER, 16, none), + }, + [1] = { + .name = "fd", + .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 10, none), + }, +}; + +static struct lttng_event_field epoll_ctl_fields[] = { + [0] = { + .name = "data_union", + .type = { + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(lttng_epoll_data_fields), + .u._struct.fields = lttng_epoll_data_fields, + } + }, + [1] = { + .name = "raw_events", + .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 16, none), + }, + [2] = { + .name = "events", + .type = { + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(lttng_epoll_ctl_events_fields), + .u._struct.fields = lttng_epoll_ctl_events_fields, + } + }, +}; +#endif /* ONCE_LTTNG_TRACE_EPOLL_CTL_H */ + +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) +#define OVERRIDE_32_epoll_ctl +#define OVERRIDE_64_epoll_ctl +SC_LTTNG_TRACEPOINT_EVENT_CODE(epoll_ctl, + TP_PROTO(sc_exit(long ret,) int epfd, int op, int fd, + struct epoll_event __user * uevent), + TP_ARGS(sc_exit(ret,) epfd, op, fd, uevent), + TP_locvar( + struct epoll_event event; + int err; + ), + TP_code_pre( + tp_locvar->err = lib_ring_buffer_copy_from_user_check_nofault( + &tp_locvar->event, uevent, sizeof(struct epoll_event)); + ), + TP_FIELDS( + sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, epfd, epfd)) + sc_in(ctf_enum(lttng_epoll_op, int, op_enum, op)) + sc_in(ctf_integer(int, fd, fd)) + sc_in( + ctf_custom_field( + ctf_custom_type( + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(epoll_ctl_fields), + .u._struct.fields = epoll_ctl_fields, + ), + event, + ctf_custom_code( + ctf_align(uint64_t) + if (!tp_locvar->err) { + ctf_integer_type(uint64_t, tp_locvar->event.data) + ctf_integer_type(int, tp_locvar->event.data) + ctf_integer_bitfield_type(uint32_t, + tp_locvar->event.events) + ctf_integer_bitfield_type(uint8_t, + (uint8_t) tp_locvar->event.events) + } else { + ctf_integer_type(uint64_t, 0) + ctf_integer_type(int, 0) + ctf_integer_bitfield_type(uint32_t, 0) + ctf_integer_bitfield_type(uint8_t, 0) + } + ) + ) + ) + ), + TP_code_post() +) +#endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */ + +#ifndef ONCE_LTTNG_TRACE_EPOLL_H +#define ONCE_LTTNG_TRACE_EPOLL_H + +static struct lttng_event_field lttng_epoll_wait_fields[] = { + [0] = { + .name = "data_union", + .type = { + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(lttng_epoll_data_fields), + .u._struct.fields = lttng_epoll_data_fields, + } + }, + [1] = { + .name = "raw_events", + .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 16, none), + }, + [2] = { + .name = "events", + .type = { + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(lttng_epoll_ctl_events_fields), + .u._struct.fields = lttng_epoll_ctl_events_fields, + } + }, +}; + +static struct lttng_type lttng_epoll_wait_elem = { + .atype = atype_struct, + .u._struct.nr_fields = ARRAY_SIZE(lttng_epoll_wait_fields), + .u._struct.fields = lttng_epoll_wait_fields, +}; + +#endif /* ONCE_LTTNG_TRACE_EPOLL_H */ + +#define LTTNG_SYSCALL_EPOLL_WAIT_locvar \ + sc_out( \ + unsigned int fds_length; \ + uint8_t overflow; \ + struct epoll_event *events; \ + ) + +#define LTTNG_SYSCALL_EPOLL_WAIT_code_pre \ + BUILD_BUG_ON(((ARRAY_SIZE(lttng_epoll_ctl_events_fields) - 1) + \ + EPOLL_FLAGS_PADDING_SIZE) != \ + sizeof(uint8_t) * BITS_PER_BYTE); \ + sc_out({ \ + int err; \ + unsigned long maxalloc; \ + \ + tp_locvar->fds_length = 0; \ + tp_locvar->events = NULL; \ + tp_locvar->overflow = 0; \ + \ + if (maxevents <= 0 || ret <= 0 || ret > maxevents) \ + goto skip_code; \ + \ + if (maxevents > PAGE_SIZE / sizeof(struct epoll_event)) { \ + maxalloc = PAGE_SIZE / sizeof(struct epoll_event); \ + } else { \ + maxalloc = maxevents; \ + } \ + \ + if (ret > maxalloc) { \ + tp_locvar->fds_length = maxalloc; \ + tp_locvar->overflow = 1; \ + } else { \ + tp_locvar->fds_length = ret; \ + } \ + \ + tp_locvar->events = kmalloc( \ + maxalloc * sizeof(struct epoll_event), \ + GFP_ATOMIC | GFP_NOWAIT); \ + if (!tp_locvar->events) { \ + tp_locvar->fds_length = 0; \ + goto skip_code; \ + } \ + \ + err = lib_ring_buffer_copy_from_user_check_nofault( \ + tp_locvar->events, uevents, \ + maxalloc * sizeof(struct epoll_event)); \ + if (err != 0) \ + tp_locvar->fds_length = 0; \ + } \ + skip_code: \ + ) + +#define LTTNG_SYSCALL_EPOLL_WAIT_fds_field \ + ctf_custom_field( \ + ctf_custom_type( \ + .atype = atype_sequence_compound, \ + .u.sequence_compound.length_name = \ + "fds_length", \ + .u.sequence_compound.elem_type = \ + <tng_epoll_wait_elem, \ + ), \ + fds, \ + ctf_custom_code( \ + uint32_t i; \ + \ + ctf_align(uint64_t) \ + for (i = 0; i < tp_locvar->fds_length; i++) { \ + ctf_integer_type(uint64_t, tp_locvar->events[i].data) \ + ctf_integer_type(int, tp_locvar->events[i].data) \ + ctf_integer_bitfield_type(uint32_t, \ + tp_locvar->events[i].events) \ + ctf_integer_bitfield_type(uint8_t, \ + (uint8_t) tp_locvar->events[i].events) \ + } \ + ) \ + ) + +#define LTTNG_SYSCALL_EPOLL_WAIT_code_post \ + sc_out( \ + kfree(tp_locvar->events); \ + ) + + +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) +#define OVERRIDE_32_epoll_wait +#define OVERRIDE_64_epoll_wait +SC_LTTNG_TRACEPOINT_EVENT_CODE(epoll_wait, + TP_PROTO(sc_exit(long ret,) int epfd, struct epoll_event __user * uevents, + int maxevents, int timeout), + TP_ARGS(sc_exit(ret,) epfd, uevents, maxevents, timeout), + TP_locvar( + LTTNG_SYSCALL_EPOLL_WAIT_locvar + ), + TP_code_pre( + LTTNG_SYSCALL_EPOLL_WAIT_code_pre + ), + TP_FIELDS( + sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, epfd, epfd)) + sc_in(ctf_integer(int, maxevents, maxevents)) + sc_in(ctf_integer(int, timeout, timeout)) + sc_out(ctf_integer(unsigned int, fds_length, tp_locvar->fds_length)) + sc_out(ctf_integer(uint8_t, overflow, tp_locvar->overflow)) + sc_out( + LTTNG_SYSCALL_EPOLL_WAIT_fds_field + ) + ), + TP_code_post( + LTTNG_SYSCALL_EPOLL_WAIT_code_post + ) +) +#endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) */ + +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) +#define OVERRIDE_32_epoll_pwait +#define OVERRIDE_64_epoll_pwait +SC_LTTNG_TRACEPOINT_EVENT_CODE(epoll_pwait, + TP_PROTO(sc_exit(long ret,) int epfd, struct epoll_event __user * uevents, + int maxevents, int timeout, const sigset_t __user * sigmask, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) epfd, uevents, maxevents, timeout, sigmask, sigsetsize), + TP_locvar( + LTTNG_SYSCALL_EPOLL_WAIT_locvar + ), + TP_code_pre( + LTTNG_SYSCALL_EPOLL_WAIT_code_pre + ), + TP_FIELDS( + sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, epfd, epfd)) + sc_in(ctf_integer(int, maxevents, maxevents)) + sc_in(ctf_integer(int, timeout, timeout)) + sc_in(ctf_integer_hex(const sigset_t *, sigmask, sigmask)) + sc_in(ctf_integer(size_t, sigsetsize, sigsetsize)) + sc_out(ctf_integer(unsigned int, fds_length, tp_locvar->fds_length)) + sc_out(ctf_integer(uint8_t, overflow, tp_locvar->overflow)) + sc_out( + LTTNG_SYSCALL_EPOLL_WAIT_fds_field + ) + ), + TP_code_post( + LTTNG_SYSCALL_EPOLL_WAIT_code_post + ) +) +#endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */ + +#if (defined(CONFIG_X86_64) && !defined(LTTNG_SC_COMPAT)) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) +#define OVERRIDE_32_socketpair +#define OVERRIDE_64_socketpair +SC_LTTNG_TRACEPOINT_EVENT(socketpair, + TP_PROTO(sc_exit(long ret,) int family, int type, int protocol, int *usockvec), + TP_ARGS(sc_exit(ret,) family, type, protocol, usockvec), + TP_FIELDS( + sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, family, family)) + sc_in(ctf_integer(int, type, type)) + sc_in(ctf_integer(int, protocol, protocol)) + sc_out(ctf_user_array(int, socket, usockvec, 2)) + ) +) +#endif /* (defined(CONFIG_X86_64) && !defined(LTTNG_SC_COMPAT)) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */ + #endif /* CREATE_SYSCALL_TABLE */