} \
\
if (inp) { \
- tp_locvar->fds_in = kmalloc( \
- tp_locvar->nr_ulong * sizeof(unsigned long), \
- GFP_ATOMIC | GFP_NOWAIT); \
+ tp_locvar->fds_in = lttng_tp_mempool_alloc( \
+ tp_locvar->nr_ulong * sizeof(unsigned long)); \
if (!tp_locvar->fds_in) \
goto error; \
\
goto error; \
} \
if (outp) { \
- tp_locvar->fds_out = kmalloc( \
- tp_locvar->nr_ulong * sizeof(unsigned long), \
- GFP_ATOMIC | GFP_NOWAIT); \
+ tp_locvar->fds_out = lttng_tp_mempool_alloc( \
+ tp_locvar->nr_ulong * sizeof(unsigned long)); \
if (!tp_locvar->fds_out) \
goto error; \
\
goto error; \
} \
if (exp) { \
- tp_locvar->fds_ex = kmalloc( \
- tp_locvar->nr_ulong * sizeof(unsigned long), \
- GFP_ATOMIC | GFP_NOWAIT); \
+ tp_locvar->fds_ex = lttng_tp_mempool_alloc( \
+ tp_locvar->nr_ulong * sizeof(unsigned long)); \
if (!tp_locvar->fds_ex) \
goto error; \
\
ctf_custom_type( \
.atype = atype_sequence, \
.u.sequence.length_type = __type_integer( \
- uint8_t, 0, 0, 0, __BYTE_ORDER, 10, none), \
+ uint8_t, 0, 0, 0, __BYTE_ORDER, 0, 10, none), \
.u.sequence.elem_type = __type_integer(uint8_t, 0, 0, 0, \
- __BYTE_ORDER, 16, none), \
+ __BYTE_ORDER, 0, 16, none), \
), \
name, \
ctf_custom_code( \
ctf_custom_type( \
.atype = atype_sequence, \
.u.sequence.length_type = __type_integer( \
- uint8_t, 0, 0, 0, __BYTE_ORDER, 10, none), \
+ uint8_t, 0, 0, 0, __BYTE_ORDER, 0, 10, none), \
.u.sequence.elem_type = __type_integer(uint8_t, 0, 0, 0, \
- __BYTE_ORDER, 16, none), \
+ __BYTE_ORDER, 0, 16, none), \
), \
name, \
ctf_custom_code( \
)
#define LTTNG_SYSCALL_SELECT_code_post \
- kfree(tp_locvar->fds_in); \
- kfree(tp_locvar->fds_out); \
- kfree(tp_locvar->fds_ex);
+ lttng_tp_mempool_free(tp_locvar->fds_in); \
+ lttng_tp_mempool_free(tp_locvar->fds_out); \
+ lttng_tp_mempool_free(tp_locvar->fds_ex);
#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM)
#define OVERRIDE_32_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
static struct lttng_event_field lttng_pollfd_flag_fields[] = {
[ilog2(POLLIN)] = {
.name = "POLLIN",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
[ilog2(POLLPRI)] = {
.name = "POLLPRI",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
[ilog2(POLLOUT)] = {
.name = "POLLOUT",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
[ilog2(POLLERR)] = {
.name = "POLLERR",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
[ilog2(POLLHUP)] = {
.name = "POLLHUP",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
[ilog2(POLLNVAL)] = {
.name = "POLLNVAL",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
[ilog2(LTTNG_POLL_NRFLAGS)] = {
.name = "padding",
.type = __type_integer(int, POLL_FLAGS_PADDING_SIZE, 1, 0,
- __LITTLE_ENDIAN, 10, none),
+ __LITTLE_ENDIAN, 0, 10, none),
},
};
static struct lttng_event_field lttng_pollfd_fields[] = {
[0] = {
.name = "fd",
- .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 10, none),
+ .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 0, 10, none),
},
[1] = {
.name = "raw_events",
- .type = __type_integer(short, 0, 0, 0, __BYTE_ORDER, 16, none),
+ .type = __type_integer(short, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
},
[2] = {
.name = "events",
{ \
int err; \
\
- tp_locvar->fds = kmalloc(tp_locvar->alloc_fds, \
- GFP_ATOMIC | GFP_NOWAIT); \
+ tp_locvar->fds = lttng_tp_mempool_alloc(tp_locvar->alloc_fds); \
if (!tp_locvar->fds) \
goto error; \
err = lib_ring_buffer_copy_from_user_check_nofault( \
)
#define LTTNG_SYSCALL_POLL_code_post \
- kfree(tp_locvar->fds);
+ lttng_tp_mempool_free(tp_locvar->fds);
#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM)
#define OVERRIDE_32_poll
LTTNG_SYSCALL_POLL_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_ppoll
/* 0x0001 */
[ilog2(POLLIN)] = {
.name = "EPOLLIN",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
/* 0x0002 */
[ilog2(POLLPRI)] = {
.name = "EPOLLPRI",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
/* 0x0004 */
[ilog2(POLLOUT)] = {
.name = "EPOLLOUT",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
/* 0x0008 */
[ilog2(POLLERR)] = {
.name = "EPOLLERR",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
/* 0x0010 */
[ilog2(POLLHUP)] = {
.name = "EPOLLHUP",
- .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 10, none),
+ .type = __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN, 0, 10, none),
},
[ilog2(LTTNG_EPOLL_NRFLAGS)] = {
.name = "padding",
.type = __type_integer(int, EPOLL_FLAGS_PADDING_SIZE, 1, 0,
- __LITTLE_ENDIAN, 10, none),
+ __LITTLE_ENDIAN, 0, 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),
+ .type = __type_integer(uint64_t, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
},
[1] = {
.name = "fd",
- .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 10, none),
+ .type = __type_integer(int, 0, 0, 0, __BYTE_ORDER, 0, 10, none),
},
};
},
[1] = {
.name = "raw_events",
- .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 16, none),
+ .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
},
[2] = {
.name = "events",
},
[1] = {
.name = "raw_events",
- .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 16, none),
+ .type = __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER, 0, 16, none),
},
[2] = {
.name = "events",
tp_locvar->fds_length = ret; \
} \
\
- tp_locvar->events = kmalloc( \
- maxalloc * sizeof(struct epoll_event), \
- GFP_ATOMIC | GFP_NOWAIT); \
+ tp_locvar->events = lttng_tp_mempool_alloc( \
+ maxalloc * sizeof(struct epoll_event)); \
if (!tp_locvar->events) { \
tp_locvar->fds_length = 0; \
goto skip_code; \
#define LTTNG_SYSCALL_EPOLL_WAIT_code_post \
sc_out( \
- kfree(tp_locvar->events); \
+ lttng_tp_mempool_free(tp_locvar->events); \
)
LTTNG_SYSCALL_EPOLL_WAIT_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_epoll_pwait
)
#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 */