1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
3 #ifndef CREATE_SYSCALL_TABLE
5 #define OVERRIDE_32_execve
6 #define OVERRIDE_64_execve
7 SC_LTTNG_TRACEPOINT_EVENT(execve
,
8 TP_PROTO(sc_exit(long ret
,) const char *filename
, char *const *argv
, char *const *envp
),
9 TP_ARGS(sc_exit(ret
,) filename
, argv
, envp
),
10 TP_FIELDS(sc_exit(ctf_integer(long, ret
, ret
))
11 sc_in(ctf_user_string(filename
, filename
))
12 sc_in(ctf_integer_hex(char *const *, argv
, argv
))
13 sc_in(ctf_integer_hex(char *const *, envp
, envp
))
18 * Clone()'s `flags` field has two parts:
19 * 1. exit signal: the least significant byte of the `unsigned long` is
20 * the signal the kernel must send to the parent process on child
22 * 2. clone options: the remaining bytes of the `unsigned long` is used a
23 * bitwise flag for the clone options.
25 #define CLONE_EXIT_SIGNAL_FLAG_RESERVED_BITS 8
26 #define LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(x) ((x) >> CLONE_EXIT_SIGNAL_FLAG_RESERVED_BITS)
28 SC_LTTNG_TRACEPOINT_ENUM(lttng_clone_exit_signal_flags
,
30 ctf_enum_value("SIGHUP", SIGHUP
)
31 ctf_enum_value("SIGINT", SIGINT
)
32 ctf_enum_value("SIGQUIT", SIGQUIT
)
33 ctf_enum_value("SIGILL", SIGILL
)
34 ctf_enum_value("SIGTRAP", SIGTRAP
)
35 ctf_enum_value("SIGABRT", SIGABRT
)
36 ctf_enum_value("SIGIOT", SIGIOT
)
37 ctf_enum_value("SIGBUS", SIGBUS
)
39 ctf_enum_value("SIGEMT", SIGEMT
)
40 #endif /* #ifdef SIGEMT */
41 ctf_enum_value("SIGFPE", SIGFPE
)
42 ctf_enum_value("SIGKILL", SIGKILL
)
43 ctf_enum_value("SIGUSR1", SIGUSR1
)
44 ctf_enum_value("SIGSEGV", SIGSEGV
)
45 ctf_enum_value("SIGUSR2", SIGUSR2
)
46 ctf_enum_value("SIGPIPE", SIGPIPE
)
47 ctf_enum_value("SIGALRM", SIGALRM
)
48 ctf_enum_value("SIGTERM", SIGTERM
)
50 ctf_enum_value("SIGSTKFLT", SIGSTKFLT
)
51 #endif /* #ifdef SIGSTKFLT */
52 ctf_enum_value("SIGCHLD", SIGCHLD
)
54 ctf_enum_value("SIGCLD", SIGCLD
)
55 #endif /* #ifdef SIGCLD */
56 ctf_enum_value("SIGCONT", SIGCONT
)
57 ctf_enum_value("SIGSTOP", SIGSTOP
)
58 ctf_enum_value("SIGTSTP", SIGTSTP
)
59 ctf_enum_value("SIGTTIN", SIGTTIN
)
60 ctf_enum_value("SIGTTOU", SIGTTOU
)
61 ctf_enum_value("SIGURG", SIGURG
)
62 ctf_enum_value("SIGXCPU", SIGXCPU
)
63 ctf_enum_value("SIGXFSZ", SIGXFSZ
)
64 ctf_enum_value("SIGVTALR", SIGVTALRM
)
65 ctf_enum_value("SIGPROF", SIGPROF
)
66 ctf_enum_value("SIGWINCH", SIGWINCH
)
67 ctf_enum_value("SIGIO", SIGIO
)
68 ctf_enum_value("SIGPOLL", SIGPOLL
)
69 ctf_enum_value("SIGPWR", SIGPWR
)
71 ctf_enum_value("SIGINFO", SIGINFO
)
72 #endif /* #ifdef SIGINFO */
74 ctf_enum_value("SIGLOST", SIGLOST
)
75 #endif /* #ifdef SIGLOST */
76 ctf_enum_value("SIGSYS", SIGSYS
)
78 ctf_enum_value("SIGUNUSED", SIGUNUSED
)
79 #endif /* #ifdef SIGUNUSED */
83 SC_LTTNG_TRACEPOINT_ENUM(lttng_clone_option_flags
,
85 ctf_enum_value("CLONE_CHILD_CLEARTID", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_CHILD_CLEARTID
))
86 ctf_enum_value("CLONE_CHILD_SETTID", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_CHILD_SETTID
))
87 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
88 ctf_enum_value("CLONE_CLEAR_SIGHAND", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_CLEAR_SIGHAND
))
89 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)) */
90 ctf_enum_value("CLONE_DETACHED", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_DETACHED
))
91 ctf_enum_value("CLONE_FILES", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_FILES
))
92 ctf_enum_value("CLONE_FS", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_FS
))
93 ctf_enum_value("CLONE_IO", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_IO
))
94 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
95 ctf_enum_value("CLONE_NEWCGROUP", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWCGROUP
))
96 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) */
97 ctf_enum_value("CLONE_NEWIPC", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWIPC
))
98 ctf_enum_value("CLONE_NEWNET", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWNET
))
99 ctf_enum_value("CLONE_NEWNS", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWNS
))
100 ctf_enum_value("CLONE_NEWPID", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWPID
))
101 ctf_enum_value("CLONE_NEWUSER", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWUSER
))
102 ctf_enum_value("CLONE_NEWUTS", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWUTS
))
103 ctf_enum_value("CLONE_PARENT", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PARENT
))
104 ctf_enum_value("CLONE_PARENT_SETTID", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PARENT_SETTID
))
105 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
106 ctf_enum_value("CLONE_PIDFD", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PIDFD
))
107 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0)) */
108 ctf_enum_value("CLONE_PTRACE", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PTRACE
))
109 ctf_enum_value("CLONE_SETTLS", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_SETTLS
))
110 ctf_enum_value("CLONE_SIGHAND", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_SIGHAND
))
111 ctf_enum_value("CLONE_SYSVSEM", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_SYSVSEM
))
112 ctf_enum_value("CLONE_THREAD", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_THREAD
))
113 ctf_enum_value("CLONE_UNTRACED", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_UNTRACED
))
114 ctf_enum_value("CLONE_VFORK", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_VFORK
))
115 ctf_enum_value("CLONE_VM", LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_VM
))
119 #define LTTNG_CLONE_FLAGS_EXIT_SIGNAL \
121 .name = "exit_signal", \
123 .atype = atype_enum_nestable, \
126 .desc = &__enum_lttng_clone_exit_signal_flags, \
127 .container_type = __LTTNG_COMPOUND_LITERAL( \
128 struct lttng_type, __type_integer(unsigned long, \
129 CLONE_EXIT_SIGNAL_FLAG_RESERVED_BITS, \
130 1, -1, __BYTE_ORDER, 16, none)), \
136 #define LTTNG_CLONE_FLAGS_OPTIONS \
140 .atype = atype_enum_nestable, \
143 .desc = &__enum_lttng_clone_option_flags, \
144 .container_type = __LTTNG_COMPOUND_LITERAL( \
145 struct lttng_type, __type_integer(unsigned long,\
146 sizeof(unsigned long) * CHAR_BIT - CLONE_EXIT_SIGNAL_FLAG_RESERVED_BITS, \
147 1, -1, __BYTE_ORDER, 16, none)), \
153 #if (__BYTE_ORDER == __LITTLE_ENDIAN)
154 #define LTTNG_CLONE_FLAGS \
155 [0] = LTTNG_CLONE_FLAGS_EXIT_SIGNAL, \
156 [1] = LTTNG_CLONE_FLAGS_OPTIONS,
159 #define LTTNG_CLONE_FLAGS \
160 [0] = LTTNG_CLONE_FLAGS_OPTIONS, \
161 [1] = LTTNG_CLONE_FLAGS_EXIT_SIGNAL,
165 #define OVERRIDE_32_clone
166 #define OVERRIDE_64_clone
167 SC_LTTNG_TRACEPOINT_EVENT(clone
,
168 TP_PROTO(sc_exit(long ret
,) unsigned long clone_flags
, unsigned long newsp
,
169 void __user
*parent_tid
,
170 void __user
*child_tid
),
171 TP_ARGS(sc_exit(ret
,) clone_flags
, newsp
, parent_tid
, child_tid
),
173 sc_exit(ctf_integer(long, ret
, ret
))
178 .atype
= atype_struct_nestable
,
179 .u
.struct_nestable
.nr_fields
= 2,
180 .u
.struct_nestable
.fields
=
181 __LTTNG_COMPOUND_LITERAL(struct lttng_event_field
,
184 .u
.struct_nestable
.alignment
= lttng_alignof(unsigned long) * CHAR_BIT
,
189 ctf_integer_type(unsigned long, clone_flags
)
193 sc_in(ctf_integer_hex(unsigned long, newsp
, newsp
))
194 sc_in(ctf_integer_hex(void *, parent_tid
, parent_tid
))
195 sc_in(ctf_integer_hex(void *, child_tid
, child_tid
))
199 /* present in 32, missing in 64 due to old kernel headers */
200 #define OVERRIDE_32_getcpu
201 #define OVERRIDE_64_getcpu
202 SC_LTTNG_TRACEPOINT_EVENT(getcpu
,
203 TP_PROTO(sc_exit(long ret
,) unsigned __user
*cpup
, unsigned __user
*nodep
, void *tcache
),
204 TP_ARGS(sc_exit(ret
,) cpup
, nodep
, tcache
),
206 sc_exit(ctf_integer(long, ret
, ret
))
207 sc_out(ctf_integer_hex(unsigned *, cpup
, cpup
))
208 sc_out(ctf_integer_hex(unsigned *, nodep
, nodep
))
209 sc_inout(ctf_integer_hex(void *, tcache
, tcache
))
213 #define OVERRIDE_32_pipe2
214 #define OVERRIDE_64_pipe2
215 SC_LTTNG_TRACEPOINT_EVENT(pipe2
,
216 TP_PROTO(sc_exit(long ret
,) int * fildes
, int flags
),
217 TP_ARGS(sc_exit(ret
,) fildes
, flags
),
218 TP_FIELDS(sc_exit(ctf_integer(long, ret
, ret
))
219 sc_out(ctf_user_array(int, fildes
, fildes
, 2))
220 sc_in(ctf_integer(int, flags
, flags
))
224 #define LTTNG_SYSCALL_SELECT_locvar \
225 unsigned long *fds_in, *fds_out, *fds_ex; \
226 unsigned long nr_bytes, nr_ulong; \
229 #define LTTNG_SYSCALL_SELECT_code_pre \
233 unsigned int n_in_bytes; \
235 tp_locvar->fds_in = NULL; \
236 tp_locvar->fds_out = NULL; \
237 tp_locvar->fds_ex = NULL; \
238 tp_locvar->overflow = 0; \
248 /* On error or bogus input, don't copy anything. */ \
249 if (n >__FD_SETSIZE) \
252 n_in_bytes = DIV_ROUND_UP((unsigned int) n, BITS_PER_BYTE); \
255 * Limit atomic memory allocation to one page, since n \
256 * is limited to 1024 and the smallest page size on Linux \
257 * is 4k, this should not happen, don't try to make it work. \
259 if (n_in_bytes > PAGE_SIZE) { \
261 /* Inform the user that we did not output everything. */ \
262 tp_locvar->overflow = 1; \
265 tp_locvar->nr_bytes = n_in_bytes; \
266 tp_locvar->nr_ulong = DIV_ROUND_UP(n_in_bytes, \
267 sizeof(unsigned long)); \
271 tp_locvar->fds_in = lttng_tp_mempool_alloc( \
272 tp_locvar->nr_ulong * sizeof(unsigned long)); \
273 if (!tp_locvar->fds_in) \
276 err = lib_ring_buffer_copy_from_user_check_nofault( \
277 tp_locvar->fds_in, inp, \
278 tp_locvar->nr_ulong * sizeof(unsigned long)); \
283 tp_locvar->fds_out = lttng_tp_mempool_alloc( \
284 tp_locvar->nr_ulong * sizeof(unsigned long)); \
285 if (!tp_locvar->fds_out) \
288 err = lib_ring_buffer_copy_from_user_check_nofault( \
289 tp_locvar->fds_out, outp, \
290 tp_locvar->nr_ulong * sizeof(unsigned long)); \
295 tp_locvar->fds_ex = lttng_tp_mempool_alloc( \
296 tp_locvar->nr_ulong * sizeof(unsigned long)); \
297 if (!tp_locvar->fds_ex) \
300 err = lib_ring_buffer_copy_from_user_check_nofault( \
301 tp_locvar->fds_ex, exp, \
302 tp_locvar->nr_ulong * sizeof(unsigned long)); \
309 tp_locvar->nr_bytes = 0; \
310 tp_locvar->nr_ulong = 0; \
311 end: ; /* Label at end of compound statement. */ \
315 #define LTTNG_SYSCALL_SELECT_fds_field_LE(name, input) \
318 __type_integer(uint8_t, 0, 0, 0, __BYTE_ORDER, 10, none) \
320 _ ## name ## _length, \
323 ctf_integer_type(uint8_t, tp_locvar->nr_bytes) \
326 ctf_integer_type(uint8_t, 0) \
334 .atype = atype_sequence_nestable, \
335 .u.sequence_nestable.length_name = "_" #name "_length", \
336 .u.sequence_nestable.elem_type = __LTTNG_COMPOUND_LITERAL(struct lttng_type, \
337 __type_integer(uint8_t, 0, 0, 0, __BYTE_ORDER, 16, none)), \
338 .u.sequence_nestable.alignment = 0, \
344 unsigned int nr_bytes_out = 0; \
349 for (src = 0; src < tp_locvar->nr_ulong; src++) { \
351 for (dst = 0; dst < sizeof(long); dst++) { \
352 if (nr_bytes_out++ >= tp_locvar->nr_bytes) { \
355 ctf_user_integer_type(uint8_t, \
356 ((uint8_t __user *) (input->fds_bits + src))[dst]); \
363 #define LTTNG_SYSCALL_SELECT_fds_field_BE(name, input) \
366 __type_integer(uint8_t, 0, 0, 0, __BYTE_ORDER, 10, none) \
368 _ ## name ## _length, \
371 ctf_integer_type(uint8_t, tp_locvar->nr_bytes) \
374 ctf_integer_type(uint8_t, 0) \
382 .atype = atype_sequence_nestable, \
383 .u.sequence_nestable.elem_type = __LTTNG_COMPOUND_LITERAL(struct lttng_type, \
384 __type_integer(uint8_t, 0, 0, 0, __BYTE_ORDER, 16, none)), \
385 .u.sequence_nestable.alignment = 0, \
390 unsigned int src, nr_bytes_out = 0; \
395 for (src = 0; src < tp_locvar->nr_ulong; src++) { \
397 for (dst = sizeof(long); dst >= 0; dst--) { \
398 if (nr_bytes_out++ >= tp_locvar->nr_bytes) { \
401 ctf_user_integer_type(uint8_t, \
402 ((uint8_t __user *) (input->fds_bits + src))[dst]); \
409 #define LTTNG_SYSCALL_SELECT_code_post \
410 lttng_tp_mempool_free(tp_locvar->fds_in); \
411 lttng_tp_mempool_free(tp_locvar->fds_out); \
412 lttng_tp_mempool_free(tp_locvar->fds_ex);
414 #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM)
415 #define OVERRIDE_32_select
416 #define OVERRIDE_64_select
417 SC_LTTNG_TRACEPOINT_EVENT_CODE(select
,
418 TP_PROTO(sc_exit(long ret
,) int n
, fd_set __user
*inp
, fd_set __user
*outp
,
419 fd_set __user
*exp
, struct timeval
*tvp
),
420 TP_ARGS(sc_exit(ret
,) n
, inp
, outp
, exp
, tvp
),
422 LTTNG_SYSCALL_SELECT_locvar
425 LTTNG_SYSCALL_SELECT_code_pre
428 sc_exit(ctf_integer(long, ret
, ret
))
429 sc_in(ctf_integer(int, n
, n
))
430 sc_inout(ctf_integer(uint8_t, overflow
, tp_locvar
->overflow
))
431 sc_inout(ctf_integer(struct timeval
*, tvp
, tvp
))
434 #if (__BYTE_ORDER == __LITTLE_ENDIAN)
435 LTTNG_SYSCALL_SELECT_fds_field_LE(readfds
, inp
)
436 LTTNG_SYSCALL_SELECT_fds_field_LE(writefds
, outp
)
437 LTTNG_SYSCALL_SELECT_fds_field_LE(exceptfds
, exp
)
439 LTTNG_SYSCALL_SELECT_fds_field_BE(readfds
, inp
)
440 LTTNG_SYSCALL_SELECT_fds_field_BE(writefds
, outp
)
441 LTTNG_SYSCALL_SELECT_fds_field_BE(exceptfds
, exp
)
446 LTTNG_SYSCALL_SELECT_code_post
449 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) */
451 #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM)
452 #define OVERRIDE_32_pselect6
453 #define OVERRIDE_64_pselect6
454 SC_LTTNG_TRACEPOINT_EVENT_CODE(pselect6
,
455 TP_PROTO(sc_exit(long ret
,) int n
, fd_set __user
* inp
, fd_set __user
* outp
,
456 fd_set __user
* exp
, struct timeval __user
* tvp
, void __user
* sig
),
457 TP_ARGS(sc_exit(ret
,) n
, inp
, outp
, exp
, tvp
, sig
),
459 LTTNG_SYSCALL_SELECT_locvar
462 LTTNG_SYSCALL_SELECT_code_pre
465 sc_exit(ctf_integer(long, ret
, ret
))
466 sc_in(ctf_integer(int, n
, n
))
467 sc_inout(ctf_integer(uint8_t, overflow
, tp_locvar
->overflow
))
468 sc_inout(ctf_integer(struct timeval
*, tvp
, tvp
))
469 sc_in(ctf_integer_hex(void *, sig
, sig
))
472 #if (__BYTE_ORDER == __LITTLE_ENDIAN)
473 LTTNG_SYSCALL_SELECT_fds_field_LE(readfds
, inp
)
474 LTTNG_SYSCALL_SELECT_fds_field_LE(writefds
, outp
)
475 LTTNG_SYSCALL_SELECT_fds_field_LE(exceptfds
, exp
)
477 LTTNG_SYSCALL_SELECT_fds_field_BE(readfds
, inp
)
478 LTTNG_SYSCALL_SELECT_fds_field_BE(writefds
, outp
)
479 LTTNG_SYSCALL_SELECT_fds_field_BE(exceptfds
, exp
)
484 LTTNG_SYSCALL_SELECT_code_post
487 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */
489 #ifndef ONCE_LTTNG_TRACE_POLL_H
490 #define ONCE_LTTNG_TRACE_POLL_H
492 #define LTTNG_POLL_NRFLAGS (POLLNVAL + 1)
493 #define POLL_FLAGS_PADDING_SIZE (sizeof(uint8_t) * BITS_PER_BYTE) - \
494 ilog2(LTTNG_POLL_NRFLAGS - 1)
497 * Only extract the values specified by iBCS2 for now.
499 static struct lttng_event_field lttng_pollfd_flag_fields
[] = {
502 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
506 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
510 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
514 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
518 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
520 [ilog2(POLLNVAL
)] = {
522 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
524 [ilog2(LTTNG_POLL_NRFLAGS
)] = {
526 .type
= __type_integer(int, POLL_FLAGS_PADDING_SIZE
, 1, 0,
527 __LITTLE_ENDIAN
, 10, none
),
531 static struct lttng_event_field lttng_pollfd_fields
[] = {
534 .type
= __type_integer(int, 0, 0, 0, __BYTE_ORDER
, 10, none
),
537 .name
= "raw_events",
538 .type
= __type_integer(short, 0, 0, 0, __BYTE_ORDER
, 16, none
),
543 .atype
= atype_struct_nestable
,
544 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(lttng_pollfd_flag_fields
),
545 .u
.struct_nestable
.fields
= lttng_pollfd_flag_fields
,
546 .u
.struct_nestable
.alignment
= 0,
551 static struct lttng_type lttng_pollfd_elem
= {
552 .atype
= atype_struct_nestable
,
553 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(lttng_pollfd_fields
),
554 .u
.struct_nestable
.fields
= lttng_pollfd_fields
,
555 .u
.struct_nestable
.alignment
= 0,
557 #endif /* ONCE_LTTNG_TRACE_POLL_H */
559 #define LTTNG_SYSCALL_POLL_locvar \
560 unsigned int fds_length, fds_max_len, alloc_fds; \
561 struct pollfd *fds; \
564 #define LTTNG_SYSCALL_POLL_code_pre \
565 BUILD_BUG_ON(((ARRAY_SIZE(lttng_pollfd_flag_fields) - 1) + \
566 POLL_FLAGS_PADDING_SIZE) != \
567 sizeof(uint8_t) * BITS_PER_BYTE); \
568 tp_locvar->fds = NULL; \
569 tp_locvar->overflow = 0; \
572 if (nfds > PAGE_SIZE / sizeof(struct pollfd)) { \
573 tp_locvar->fds_length = PAGE_SIZE / sizeof(struct pollfd); \
574 tp_locvar->fds_max_len = PAGE_SIZE / sizeof(struct pollfd); \
575 tp_locvar->overflow = 1; \
577 tp_locvar->fds_length = nfds; \
578 tp_locvar->fds_max_len = nfds; \
580 tp_locvar->alloc_fds = tp_locvar->fds_length * sizeof(struct pollfd); \
583 * On exit, the number of active FDs is determined by ret, \
584 * nfds stays the same as the entry, but we only want to \
585 * output the FDs that are relevant. \
588 if (ret <= 0 || ret > nfds) \
591 if (nfds > PAGE_SIZE / sizeof(struct pollfd)) { \
592 tp_locvar->fds_length = PAGE_SIZE / sizeof(struct pollfd); \
593 tp_locvar->fds_max_len = PAGE_SIZE / sizeof(struct pollfd); \
594 tp_locvar->overflow = 1; \
596 tp_locvar->fds_length = ret; \
597 tp_locvar->fds_max_len = nfds; \
599 tp_locvar->alloc_fds = tp_locvar->fds_max_len * sizeof(struct pollfd); \
604 tp_locvar->fds = lttng_tp_mempool_alloc(tp_locvar->alloc_fds); \
605 if (!tp_locvar->fds) \
607 err = lib_ring_buffer_copy_from_user_check_nofault( \
608 tp_locvar->fds, ufds, tp_locvar->alloc_fds); \
615 tp_locvar->fds_length = 0; \
616 tp_locvar->fds_max_len = 0; \
620 #define LTTNG_SYSCALL_POLL_fds_field \
625 .atype = atype_sequence_nestable, \
626 .u.sequence_nestable.length_name = "fds_length", \
627 .u.sequence_nestable.elem_type = <tng_pollfd_elem, \
634 ctf_align(int) /* Align on largest field in struct. */ \
635 for (i = 0; i < tp_locvar->fds_length; i++) { \
636 ctf_integer_type(int, tp_locvar->fds[i].fd) \
637 ctf_integer_type(short, tp_locvar->fds[i].events) \
638 ctf_integer_bitfield_type(uint8_t, \
639 (uint8_t) tp_locvar->fds[i].events) \
648 .atype = atype_sequence_nestable, \
649 .u.sequence_nestable.length_name = "fds_length", \
650 .u.sequence_nestable.elem_type = <tng_pollfd_elem, \
655 unsigned int i, nr = 0; \
657 ctf_align(int) /* Align on largest field in struct. */ \
659 * Iterate over the complete array, but only output \
660 * "ret" active FDs. \
662 for (i = 0; i < tp_locvar->fds_max_len; i++) { \
663 if (!tp_locvar->fds[i].revents) \
665 if (nr++ >= tp_locvar->fds_length) \
667 ctf_integer_type(int, tp_locvar->fds[i].fd) \
668 ctf_integer_type(short, tp_locvar->fds[i].revents) \
669 ctf_integer_bitfield_type(uint8_t, \
670 (uint8_t) tp_locvar->fds[i].revents) \
673 * If there is a discrepancy between ret and the \
674 * content of revents (e.g. caused by userspace corrupting \
675 * the array from a concurrent thread), we have to output \
676 * zeros to keep the trace readable. \
678 for (i = nr; i < tp_locvar->fds_length; i++) { \
679 ctf_integer_type(int, 0) \
680 ctf_integer_type(short, 0) \
681 ctf_integer_bitfield_type(uint8_t, 0) \
687 #define LTTNG_SYSCALL_POLL_code_post \
688 lttng_tp_mempool_free(tp_locvar->fds);
690 #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM)
691 #define OVERRIDE_32_poll
692 #define OVERRIDE_64_poll
693 SC_LTTNG_TRACEPOINT_EVENT_CODE(poll
,
694 TP_PROTO(sc_exit(long ret
,) struct pollfd __user
* ufds
,
695 unsigned int nfds
, int timeout_msecs
),
696 TP_ARGS(sc_exit(ret
,) ufds
, nfds
, timeout_msecs
),
698 LTTNG_SYSCALL_POLL_locvar
701 LTTNG_SYSCALL_POLL_code_pre
704 sc_exit(ctf_integer(long, ret
, ret
))
705 sc_in(ctf_integer(int, timeout_msecs
, timeout_msecs
))
706 sc_inout(ctf_integer(unsigned int, nfds
, nfds
))
707 sc_inout(ctf_integer(unsigned int, fds_length
, tp_locvar
->fds_length
))
708 sc_in(ctf_integer(uint8_t, overflow
, tp_locvar
->overflow
))
709 LTTNG_SYSCALL_POLL_fds_field
712 LTTNG_SYSCALL_POLL_code_post
715 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) */
717 #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM)
718 #define OVERRIDE_32_ppoll
719 #define OVERRIDE_64_ppoll
720 SC_LTTNG_TRACEPOINT_EVENT_CODE(ppoll
,
721 TP_PROTO(sc_exit(long ret
,) struct pollfd __user
* ufds
,
722 unsigned int nfds
, struct timespec
* tsp
, const sigset_t
* sigmask
, size_t sigsetsize
),
723 TP_ARGS(sc_exit(ret
,) ufds
, nfds
, tsp
, sigmask
, sigsetsize
),
725 LTTNG_SYSCALL_POLL_locvar
728 LTTNG_SYSCALL_POLL_code_pre
731 sc_exit(ctf_integer(long, ret
, ret
))
732 sc_in(ctf_integer(struct timespec
*, tsp
, tsp
))
733 sc_in(ctf_integer(const sigset_t
*, sigmask
, sigmask
))
734 sc_in(ctf_integer(size_t, sigsetsize
, sigsetsize
))
735 sc_inout(ctf_integer(unsigned int, nfds
, nfds
))
736 sc_inout(ctf_integer(unsigned int, fds_length
, tp_locvar
->fds_length
))
737 sc_inout(ctf_integer(uint8_t, overflow
, tp_locvar
->overflow
))
738 LTTNG_SYSCALL_POLL_fds_field
741 LTTNG_SYSCALL_POLL_code_post
744 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */
746 #include <linux/eventpoll.h>
748 SC_LTTNG_TRACEPOINT_ENUM(lttng_epoll_op
,
750 ctf_enum_value("EPOLL_CTL_ADD", EPOLL_CTL_ADD
)
751 ctf_enum_value("EPOLL_CTL_DEL", EPOLL_CTL_DEL
)
752 ctf_enum_value("EPOLL_CTL_MOD", EPOLL_CTL_MOD
)
756 #ifndef ONCE_LTTNG_TRACE_EPOLL_CTL_H
757 #define ONCE_LTTNG_TRACE_EPOLL_CTL_H
759 #define LTTNG_EPOLL_NRFLAGS (POLLHUP + 1)
760 #define EPOLL_FLAGS_PADDING_SIZE (sizeof(uint8_t) * BITS_PER_BYTE) - \
761 ilog2(LTTNG_EPOLL_NRFLAGS - 1)
764 * Only extract the values specified by iBCS2 for now.
766 static struct lttng_event_field lttng_epoll_ctl_events_fields
[] = {
770 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
775 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
780 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
785 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
790 .type
= __type_integer(int, 1, 1, 0, __LITTLE_ENDIAN
, 10, none
),
792 [ilog2(LTTNG_EPOLL_NRFLAGS
)] = {
794 .type
= __type_integer(int, EPOLL_FLAGS_PADDING_SIZE
, 1, 0,
795 __LITTLE_ENDIAN
, 10, none
),
800 static struct lttng_event_field lttng_epoll_data_fields
[] = {
803 .type
= __type_integer(uint64_t, 0, 0, 0, __BYTE_ORDER
, 16, none
),
807 .type
= __type_integer(int, 0, 0, 0, __BYTE_ORDER
, 10, none
),
811 static struct lttng_event_field epoll_ctl_fields
[] = {
813 .name
= "data_union",
815 .atype
= atype_struct_nestable
,
816 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(lttng_epoll_data_fields
),
817 .u
.struct_nestable
.fields
= lttng_epoll_data_fields
,
818 .u
.struct_nestable
.alignment
= 0,
822 .name
= "raw_events",
823 .type
= __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER
, 16, none
),
828 .atype
= atype_struct_nestable
,
829 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(lttng_epoll_ctl_events_fields
),
830 .u
.struct_nestable
.fields
= lttng_epoll_ctl_events_fields
,
831 .u
.struct_nestable
.alignment
= 0,
835 #endif /* ONCE_LTTNG_TRACE_EPOLL_CTL_H */
837 #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM)
838 #define OVERRIDE_32_epoll_ctl
839 #define OVERRIDE_64_epoll_ctl
840 SC_LTTNG_TRACEPOINT_EVENT_CODE(epoll_ctl
,
841 TP_PROTO(sc_exit(long ret
,) int epfd
, int op
, int fd
,
842 struct epoll_event __user
* uevent
),
843 TP_ARGS(sc_exit(ret
,) epfd
, op
, fd
, uevent
),
845 struct epoll_event event
;
849 tp_locvar
->err
= lib_ring_buffer_copy_from_user_check_nofault(
850 &tp_locvar
->event
, uevent
, sizeof(struct epoll_event
));
853 sc_exit(ctf_integer(long, ret
, ret
))
854 sc_in(ctf_integer(int, epfd
, epfd
))
855 sc_in(ctf_enum(lttng_epoll_op
, int, op_enum
, op
))
856 sc_in(ctf_integer(int, fd
, fd
))
861 .atype
= atype_struct_nestable
,
862 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(epoll_ctl_fields
),
863 .u
.struct_nestable
.fields
= epoll_ctl_fields
,
864 .u
.struct_nestable
.alignment
= 0,
870 if (!tp_locvar
->err
) {
871 ctf_integer_type(uint64_t, tp_locvar
->event
.data
)
872 ctf_integer_type(int, tp_locvar
->event
.data
)
873 ctf_integer_bitfield_type(uint32_t,
874 tp_locvar
->event
.events
)
875 ctf_integer_bitfield_type(uint8_t,
876 (uint8_t) tp_locvar
->event
.events
)
878 ctf_integer_type(uint64_t, 0)
879 ctf_integer_type(int, 0)
880 ctf_integer_bitfield_type(uint32_t, 0)
881 ctf_integer_bitfield_type(uint8_t, 0)
889 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */
891 #ifndef ONCE_LTTNG_TRACE_EPOLL_H
892 #define ONCE_LTTNG_TRACE_EPOLL_H
894 static struct lttng_event_field lttng_epoll_wait_fields
[] = {
896 .name
= "data_union",
898 .atype
= atype_struct_nestable
,
899 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(lttng_epoll_data_fields
),
900 .u
.struct_nestable
.fields
= lttng_epoll_data_fields
,
901 .u
.struct_nestable
.alignment
= 0,
905 .name
= "raw_events",
906 .type
= __type_integer(uint32_t, 0, 0, 0, __BYTE_ORDER
, 16, none
),
911 .atype
= atype_struct_nestable
,
912 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(lttng_epoll_ctl_events_fields
),
913 .u
.struct_nestable
.fields
= lttng_epoll_ctl_events_fields
,
914 .u
.struct_nestable
.alignment
= 0,
919 static struct lttng_type lttng_epoll_wait_elem
= {
920 .atype
= atype_struct_nestable
,
921 .u
.struct_nestable
.nr_fields
= ARRAY_SIZE(lttng_epoll_wait_fields
),
922 .u
.struct_nestable
.fields
= lttng_epoll_wait_fields
,
923 .u
.struct_nestable
.alignment
= 0,
926 #endif /* ONCE_LTTNG_TRACE_EPOLL_H */
928 #define LTTNG_SYSCALL_EPOLL_WAIT_locvar \
930 unsigned int fds_length; \
932 struct epoll_event *events; \
935 #define LTTNG_SYSCALL_EPOLL_WAIT_code_pre \
936 BUILD_BUG_ON(((ARRAY_SIZE(lttng_epoll_ctl_events_fields) - 1) + \
937 EPOLL_FLAGS_PADDING_SIZE) != \
938 sizeof(uint8_t) * BITS_PER_BYTE); \
941 unsigned long maxalloc; \
943 tp_locvar->fds_length = 0; \
944 tp_locvar->events = NULL; \
945 tp_locvar->overflow = 0; \
947 if (maxevents <= 0 || ret <= 0 || ret > maxevents) \
950 if (maxevents > PAGE_SIZE / sizeof(struct epoll_event)) { \
951 maxalloc = PAGE_SIZE / sizeof(struct epoll_event); \
953 maxalloc = maxevents; \
956 if (ret > maxalloc) { \
957 tp_locvar->fds_length = maxalloc; \
958 tp_locvar->overflow = 1; \
960 tp_locvar->fds_length = ret; \
963 tp_locvar->events = lttng_tp_mempool_alloc( \
964 maxalloc * sizeof(struct epoll_event)); \
965 if (!tp_locvar->events) { \
966 tp_locvar->fds_length = 0; \
970 err = lib_ring_buffer_copy_from_user_check_nofault( \
971 tp_locvar->events, uevents, \
972 maxalloc * sizeof(struct epoll_event)); \
974 tp_locvar->fds_length = 0; \
979 #define LTTNG_SYSCALL_EPOLL_WAIT_fds_field \
983 .atype = atype_sequence_nestable, \
984 .u.sequence_nestable.length_name = \
986 .u.sequence_nestable.elem_type = \
987 <tng_epoll_wait_elem, \
994 ctf_align(uint64_t) \
995 for (i = 0; i < tp_locvar->fds_length; i++) { \
996 ctf_integer_type(uint64_t, tp_locvar->events[i].data) \
997 ctf_integer_type(int, tp_locvar->events[i].data) \
998 ctf_integer_bitfield_type(uint32_t, \
999 tp_locvar->events[i].events) \
1000 ctf_integer_bitfield_type(uint8_t, \
1001 (uint8_t) tp_locvar->events[i].events) \
1006 #define LTTNG_SYSCALL_EPOLL_WAIT_code_post \
1008 lttng_tp_mempool_free(tp_locvar->events); \
1012 #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM)
1013 #define OVERRIDE_32_epoll_wait
1014 #define OVERRIDE_64_epoll_wait
1015 SC_LTTNG_TRACEPOINT_EVENT_CODE(epoll_wait
,
1016 TP_PROTO(sc_exit(long ret
,) int epfd
, struct epoll_event __user
* uevents
,
1017 int maxevents
, int timeout
),
1018 TP_ARGS(sc_exit(ret
,) epfd
, uevents
, maxevents
, timeout
),
1020 LTTNG_SYSCALL_EPOLL_WAIT_locvar
1023 LTTNG_SYSCALL_EPOLL_WAIT_code_pre
1026 sc_exit(ctf_integer(long, ret
, ret
))
1027 sc_in(ctf_integer(int, epfd
, epfd
))
1028 sc_in(ctf_integer(int, maxevents
, maxevents
))
1029 sc_in(ctf_integer(int, timeout
, timeout
))
1030 sc_out(ctf_integer(unsigned int, fds_length
, tp_locvar
->fds_length
))
1031 sc_out(ctf_integer(uint8_t, overflow
, tp_locvar
->overflow
))
1033 LTTNG_SYSCALL_EPOLL_WAIT_fds_field
1037 LTTNG_SYSCALL_EPOLL_WAIT_code_post
1040 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) */
1042 #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM)
1043 #define OVERRIDE_32_epoll_pwait
1044 #define OVERRIDE_64_epoll_pwait
1045 SC_LTTNG_TRACEPOINT_EVENT_CODE(epoll_pwait
,
1046 TP_PROTO(sc_exit(long ret
,) int epfd
, struct epoll_event __user
* uevents
,
1047 int maxevents
, int timeout
, const sigset_t __user
* sigmask
, size_t sigsetsize
),
1048 TP_ARGS(sc_exit(ret
,) epfd
, uevents
, maxevents
, timeout
, sigmask
, sigsetsize
),
1050 LTTNG_SYSCALL_EPOLL_WAIT_locvar
1053 LTTNG_SYSCALL_EPOLL_WAIT_code_pre
1056 sc_exit(ctf_integer(long, ret
, ret
))
1057 sc_in(ctf_integer(int, epfd
, epfd
))
1058 sc_in(ctf_integer(int, maxevents
, maxevents
))
1059 sc_in(ctf_integer(int, timeout
, timeout
))
1060 sc_in(ctf_integer_hex(const sigset_t
*, sigmask
, sigmask
))
1061 sc_in(ctf_integer(size_t, sigsetsize
, sigsetsize
))
1062 sc_out(ctf_integer(unsigned int, fds_length
, tp_locvar
->fds_length
))
1063 sc_out(ctf_integer(uint8_t, overflow
, tp_locvar
->overflow
))
1065 LTTNG_SYSCALL_EPOLL_WAIT_fds_field
1069 LTTNG_SYSCALL_EPOLL_WAIT_code_post
1072 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */
1074 #if (defined(CONFIG_X86_64) && !defined(LTTNG_SC_COMPAT)) || defined(CONFIG_ARM64) || defined(CONFIG_ARM)
1075 #define OVERRIDE_32_socketpair
1076 #define OVERRIDE_64_socketpair
1077 SC_LTTNG_TRACEPOINT_EVENT(socketpair
,
1078 TP_PROTO(sc_exit(long ret
,) int family
, int type
, int protocol
, int *usockvec
),
1079 TP_ARGS(sc_exit(ret
,) family
, type
, protocol
, usockvec
),
1081 sc_exit(ctf_integer(long, ret
, ret
))
1082 sc_in(ctf_integer(int, family
, family
))
1083 sc_in(ctf_integer(int, type
, type
))
1084 sc_in(ctf_integer(int, protocol
, protocol
))
1085 sc_out(ctf_user_array(int, socket
, usockvec
, 2))
1088 #endif /* (defined(CONFIG_X86_64) && !defined(LTTNG_SC_COMPAT)) || defined(CONFIG_ARM64) || defined(CONFIG_ARM) */
1091 * Enumeration of the open flags, as described in the 'open'
1092 * system call man page.
1094 SC_LTTNG_TRACEPOINT_ENUM(lttng_file_status_flags
,
1096 ctf_enum_value("O_RDONLY", O_RDONLY
)
1097 ctf_enum_value("O_WRONLY", O_WRONLY
)
1098 ctf_enum_value("O_RDWR", O_RDWR
)
1099 ctf_enum_value("O_CREAT", O_CREAT
)
1100 ctf_enum_value("O_EXCL", O_EXCL
)
1101 ctf_enum_value("O_NOCTTY", O_NOCTTY
)
1102 ctf_enum_value("O_TRUNC", O_TRUNC
)
1103 ctf_enum_value("O_APPEND", O_APPEND
)
1104 ctf_enum_value("O_NONBLOCK", O_NONBLOCK
)
1105 ctf_enum_value("O_DSYNC", O_DSYNC
)
1106 ctf_enum_value("FASYNC", FASYNC
)
1107 ctf_enum_value("O_DIRECT", O_DIRECT
)
1108 ctf_enum_value("O_LARGEFILE", O_LARGEFILE
)
1109 ctf_enum_value("O_DIRECTORY", O_DIRECTORY
)
1110 ctf_enum_value("O_NOFOLLOW", O_NOFOLLOW
)
1111 ctf_enum_value("O_NOATIME", O_NOATIME
)
1112 ctf_enum_value("O_CLOEXEC", O_CLOEXEC
)
1113 ctf_enum_value("O_SYNC", __O_SYNC
)
1114 ctf_enum_value("O_PATH", O_PATH
)
1115 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1116 ctf_enum_value("O_TMPFILE", __O_TMPFILE
)
1117 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
1122 * Enumeration of the open flags, as described in the 'open'
1123 * system call man page.
1125 SC_LTTNG_TRACEPOINT_ENUM(lttng_file_mode
,
1127 ctf_enum_value("S_IRWXU", S_IRWXU
)
1128 ctf_enum_value("S_IRUSR", S_IRUSR
)
1129 ctf_enum_value("S_IWUSR", S_IWUSR
)
1130 ctf_enum_value("S_IXUSR", S_IXUSR
)
1131 ctf_enum_value("S_IRWXG", S_IRWXG
)
1132 ctf_enum_value("S_IRGRP", S_IRGRP
)
1133 ctf_enum_value("S_IWGRP", S_IWGRP
)
1134 ctf_enum_value("S_IXGRP", S_IXGRP
)
1135 ctf_enum_value("S_IRWXO", S_IRWXO
)
1136 ctf_enum_value("S_IROTH", S_IROTH
)
1137 ctf_enum_value("S_IWOTH", S_IWOTH
)
1138 ctf_enum_value("S_IXOTH", S_IXOTH
)
1139 ctf_enum_value("S_ISUID", S_ISUID
)
1140 ctf_enum_value("S_ISGID", S_ISGID
)
1141 ctf_enum_value("S_ISVTX", S_ISVTX
)
1145 #define OVERRIDE_32_openat
1146 #define OVERRIDE_64_openat
1147 SC_LTTNG_TRACEPOINT_EVENT(openat
,
1148 TP_PROTO(sc_exit(long ret
,) int dfd
, const char * filename
, int flags
, umode_t mode
),
1149 TP_ARGS(sc_exit(ret
,) dfd
, filename
, flags
, mode
),
1151 sc_exit(ctf_integer(long, ret
, ret
))
1152 sc_in(ctf_integer(int, dfd
, dfd
))
1153 sc_in(ctf_user_string(filename
, filename
))
1154 sc_in(ctf_enum(lttng_file_status_flags
, int, flags
, flags
))
1155 sc_in(ctf_enum(lttng_file_mode
, umode_t
, mode
, mode
))
1159 #define OVERRIDE_32_open
1160 #define OVERRIDE_64_open
1161 SC_LTTNG_TRACEPOINT_EVENT(open
,
1162 TP_PROTO(sc_exit(long ret
,) const char * filename
, int flags
, umode_t mode
),
1163 TP_ARGS(sc_exit(ret
,) filename
, flags
, mode
),
1165 sc_exit(ctf_integer(long, ret
, ret
))
1166 sc_in(ctf_user_string(filename
, filename
))
1167 sc_in(ctf_enum(lttng_file_status_flags
, int, flags
, flags
))
1168 sc_in(ctf_enum(lttng_file_mode
, umode_t
, mode
, mode
))
1172 #endif /* CREATE_SYSCALL_TABLE */