Branch data Line data Source code
1 : : /*
2 : : * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
3 : : * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
4 : : * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
5 : : * Copyright (c) 2001-2017 The strace developers.
6 : : * All rights reserved.
7 : : *
8 : : * Redistribution and use in source and binary forms, with or without
9 : : * modification, are permitted provided that the following conditions
10 : : * are met:
11 : : * 1. Redistributions of source code must retain the above copyright
12 : : * notice, this list of conditions and the following disclaimer.
13 : : * 2. Redistributions in binary form must reproduce the above copyright
14 : : * notice, this list of conditions and the following disclaimer in the
15 : : * documentation and/or other materials provided with the distribution.
16 : : * 3. The name of the author may not be used to endorse or promote products
17 : : * derived from this software without specific prior written permission.
18 : : *
19 : : * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 : : * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 : : * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 : : * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 : : * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 : : * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 : : * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 : : * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 : : * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 : : * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 : : */
30 : :
31 : : #ifndef STRACE_DEFS_H
32 : : #define STRACE_DEFS_H
33 : :
34 : : #ifdef HAVE_CONFIG_H
35 : : # include "config.h"
36 : : #endif
37 : :
38 : : #include <features.h>
39 : : #include <stdbool.h>
40 : : #include <stdint.h>
41 : : #include <inttypes.h>
42 : : #include <sys/types.h>
43 : : #include <stddef.h>
44 : : #include <unistd.h>
45 : : #include <stdlib.h>
46 : : #include <stdio.h>
47 : : /* Open-coding isprint(ch) et al proved more efficient than calling
48 : : * generalized libc interface. We don't *want* to do non-ASCII anyway.
49 : : */
50 : : /* #include <ctype.h> */
51 : : #include <string.h>
52 : : #include <errno.h>
53 : : #include <time.h>
54 : : #include <sys/time.h>
55 : :
56 : : #include "error_prints.h"
57 : : #include "gcc_compat.h"
58 : : #include "kernel_types.h"
59 : : #include "macros.h"
60 : : #include "mpers_type.h"
61 : : #include "sysent.h"
62 : : #include "xmalloc.h"
63 : :
64 : : #ifndef HAVE_STRERROR
65 : : const char *strerror(int);
66 : : #endif
67 : : #ifndef HAVE_STPCPY
68 : : /* Some libc have stpcpy, some don't. Sigh...
69 : : * Roll our private implementation...
70 : : */
71 : : #undef stpcpy
72 : : #define stpcpy strace_stpcpy
73 : : extern char *stpcpy(char *dst, const char *src);
74 : : #endif
75 : :
76 : : #ifndef offsetofend
77 : : # define offsetofend(type, member) \
78 : : (offsetof(type, member) + sizeof(((type *)NULL)->member))
79 : : #endif
80 : :
81 : : /* macros */
82 : : #ifndef MAX
83 : : # define MAX(a, b) (((a) > (b)) ? (a) : (b))
84 : : #endif
85 : : #ifndef MIN
86 : : # define MIN(a, b) (((a) < (b)) ? (a) : (b))
87 : : #endif
88 : : #define CLAMP(val, min, max) MIN(MAX(min, val), max)
89 : :
90 : : /* Glibc has an efficient macro for sigemptyset
91 : : * (it just does one or two assignments of 0 to internal vector of longs).
92 : : */
93 : : #if defined(__GLIBC__) && defined(__sigemptyset) && !defined(sigemptyset)
94 : : # define sigemptyset __sigemptyset
95 : : #endif
96 : :
97 : : /* Configuration section */
98 : : #ifndef DEFAULT_STRLEN
99 : : /* default maximum # of bytes printed in `printstr', change with -s switch */
100 : : # define DEFAULT_STRLEN 32
101 : : #endif
102 : : #ifndef DEFAULT_ACOLUMN
103 : : # define DEFAULT_ACOLUMN 40 /* default alignment column for results */
104 : : #endif
105 : : /*
106 : : * Maximum number of args to a syscall.
107 : : *
108 : : * Make sure that all entries in all syscallent.h files have nargs <= MAX_ARGS!
109 : : * linux/<ARCH>/syscallent*.h:
110 : : * all have nargs <= 6 except mips o32 which has nargs <= 7.
111 : : */
112 : : #ifndef MAX_ARGS
113 : : # ifdef LINUX_MIPSO32
114 : : # define MAX_ARGS 7
115 : : # else
116 : : # define MAX_ARGS 6
117 : : # endif
118 : : #endif
119 : : /* default sorting method for call profiling */
120 : : #ifndef DEFAULT_SORTBY
121 : : # define DEFAULT_SORTBY "time"
122 : : #endif
123 : : /*
124 : : * Experimental code using PTRACE_SEIZE can be enabled here.
125 : : * This needs Linux kernel 3.4.x or later to work.
126 : : */
127 : : #define USE_SEIZE 1
128 : : /* To force NOMMU build, set to 1 */
129 : : #define NOMMU_SYSTEM 0
130 : :
131 : : #ifndef ERESTARTSYS
132 : : # define ERESTARTSYS 512
133 : : #endif
134 : : #ifndef ERESTARTNOINTR
135 : : # define ERESTARTNOINTR 513
136 : : #endif
137 : : #ifndef ERESTARTNOHAND
138 : : # define ERESTARTNOHAND 514
139 : : #endif
140 : : #ifndef ERESTART_RESTARTBLOCK
141 : : # define ERESTART_RESTARTBLOCK 516
142 : : #endif
143 : :
144 : : #if defined X86_64
145 : : # define SUPPORTED_PERSONALITIES 3
146 : : # define PERSONALITY2_WORDSIZE 4
147 : : # define PERSONALITY2_KLONGSIZE PERSONALITY0_KLONGSIZE
148 : : #elif defined AARCH64 \
149 : : || defined POWERPC64 \
150 : : || defined RISCV \
151 : : || defined SPARC64 \
152 : : || defined TILE \
153 : : || defined X32
154 : : # define SUPPORTED_PERSONALITIES 2
155 : : #else
156 : : # define SUPPORTED_PERSONALITIES 1
157 : : #endif
158 : :
159 : : #if defined TILE && defined __tilepro__
160 : : # define DEFAULT_PERSONALITY 1
161 : : #else
162 : : # define DEFAULT_PERSONALITY 0
163 : : #endif
164 : :
165 : : #define PERSONALITY0_WORDSIZE SIZEOF_LONG
166 : : #define PERSONALITY0_KLONGSIZE SIZEOF_KERNEL_LONG_T
167 : : #define PERSONALITY0_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
168 : : #define PERSONALITY0_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
169 : :
170 : : #if SUPPORTED_PERSONALITIES > 1
171 : : # define PERSONALITY1_WORDSIZE 4
172 : : # define PERSONALITY1_KLONGSIZE PERSONALITY1_WORDSIZE
173 : : #endif
174 : :
175 : : #if SUPPORTED_PERSONALITIES > 1 && defined HAVE_M32_MPERS
176 : : # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
177 : : # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
178 : : # define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
179 : : # define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
180 : : #else
181 : : # define PERSONALITY1_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
182 : : # define PERSONALITY1_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
183 : : # define PERSONALITY1_INCLUDE_FUNCS "empty.h"
184 : : #endif
185 : :
186 : : #if SUPPORTED_PERSONALITIES > 2 && defined HAVE_MX32_MPERS
187 : : # define PERSONALITY2_INCLUDE_FUNCS "mx32_funcs.h"
188 : : # define PERSONALITY2_INCLUDE_PRINTERS_DECLS "mx32_printer_decls.h"
189 : : # define PERSONALITY2_INCLUDE_PRINTERS_DEFS "mx32_printer_defs.h"
190 : : # define MPERS_mx32_IOCTL_MACROS "ioctl_redefs2.h"
191 : : #else
192 : : # define PERSONALITY2_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
193 : : # define PERSONALITY2_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
194 : : # define PERSONALITY2_INCLUDE_FUNCS "empty.h"
195 : : #endif
196 : :
197 : : struct inject_opts {
198 : : uint16_t first;
199 : : uint16_t step;
200 : : uint16_t signo;
201 : : int rval;
202 : : };
203 : :
204 : : #define MAX_ERRNO_VALUE 4095
205 : : #define INJECT_OPTS_RVAL_DEFAULT (-(MAX_ERRNO_VALUE + 1))
206 : :
207 : : #include "defs_shared.h"
208 : :
209 : : /* TCB flags */
210 : : /* We have attached to this process, but did not see it stopping yet */
211 : : #define TCB_STARTUP 0x01
212 : : #define TCB_IGNORE_ONE_SIGSTOP 0x02 /* Next SIGSTOP is to be ignored */
213 : : /*
214 : : * Are we in system call entry or in syscall exit?
215 : : *
216 : : * This bit is set in syscall_entering_finish() and cleared in
217 : : * syscall_exiting_finish().
218 : : * Other stops which are possible directly after syscall entry (death, ptrace
219 : : * event stop) are handled without calling syscall_{entering,exiting}_*().
220 : : *
221 : : * Use entering(tcp) / exiting(tcp) to check this bit to make code more
222 : : * readable.
223 : : */
224 : : #define TCB_INSYSCALL 0x04
225 : : #define TCB_ATTACHED 0x08 /* We attached to it already */
226 : : #define TCB_REPRINT 0x10 /* We should reprint this syscall on exit */
227 : : #define TCB_FILTERED 0x20 /* This system call has been filtered out */
228 : : #define TCB_TAMPERED 0x40 /* A syscall has been tampered with */
229 : : #define TCB_HIDE_LOG 0x80 /* We should hide everything (until execve) */
230 : : #define TCB_SKIP_DETACH_ON_FIRST_EXEC 0x100 /* -b execve should skip detach on first execve */
231 : : #define TCB_AD_HOC_INJECT 0x200 /* an ad hoc injection was performed by Lua script */
232 : :
233 : : /* qualifier flags */
234 : : #define QUAL_TRACE 0x001 /* this system call should be traced */
235 : : #define QUAL_ABBREV 0x002 /* abbreviate the structures of this syscall */
236 : : #define QUAL_VERBOSE 0x004 /* decode the structures of this syscall */
237 : : #define QUAL_RAW 0x008 /* print all args in hex for this syscall */
238 : : #define QUAL_INJECT 0x010 /* tamper with this system call on purpose */
239 : : #define QUAL_SIGNAL 0x100 /* report events with this signal */
240 : : #define QUAL_READ 0x200 /* dump data read from this file descriptor */
241 : : #define QUAL_WRITE 0x400 /* dump data written to this file descriptor */
242 : : #define QUAL_HOOK_ENTRY 0x800 /* return this syscall on entry from next_sc() */
243 : : #define QUAL_HOOK_EXIT 0x1000 /* return this syscall on exit from next_sc() */
244 : :
245 : : #define DEFAULT_QUAL_FLAGS (QUAL_TRACE | QUAL_ABBREV | QUAL_VERBOSE)
246 : :
247 : : #define entering(tcp) (!((tcp)->flags & TCB_INSYSCALL))
248 : : #define exiting(tcp) ((tcp)->flags & TCB_INSYSCALL)
249 : : #define syserror(tcp) ((tcp)->u_error != 0)
250 : : #define verbose(tcp) ((tcp)->qual_flg & QUAL_VERBOSE)
251 : : #define abbrev(tcp) ((tcp)->qual_flg & QUAL_ABBREV)
252 : : #define filtered(tcp) ((tcp)->flags & TCB_FILTERED)
253 : : #define hide_log(tcp) ((tcp)->flags & TCB_HIDE_LOG)
254 : :
255 : : #include "xlat.h"
256 : :
257 : : extern const struct xlat addrfams[];
258 : : extern const struct xlat at_flags[];
259 : : extern const struct xlat clocknames[];
260 : : extern const struct xlat dirent_types[];
261 : : extern const struct xlat ethernet_protocols[];
262 : : extern const struct xlat evdev_abs[];
263 : : extern const struct xlat inet_protocols[];
264 : : extern const struct xlat msg_flags[];
265 : : extern const struct xlat netlink_protocols[];
266 : : extern const struct xlat open_access_modes[];
267 : : extern const struct xlat open_mode_flags[];
268 : : extern const struct xlat resource_flags[];
269 : : extern const struct xlat setns_types[];
270 : : extern const struct xlat sg_io_info[];
271 : : extern const struct xlat socketlayers[];
272 : : extern const struct xlat socktypes[];
273 : : extern const struct xlat tcp_state_flags[];
274 : : extern const struct xlat tcp_states[];
275 : : extern const struct xlat whence_codes[];
276 : :
277 : : /* Format of syscall return values */
278 : : #define RVAL_DECIMAL 000 /* decimal format */
279 : : #define RVAL_HEX 001 /* hex format */
280 : : #define RVAL_OCTAL 002 /* octal format */
281 : : #define RVAL_UDECIMAL 003 /* unsigned decimal format */
282 : : #define RVAL_FD 010 /* file descriptor */
283 : : #define RVAL_MASK 013 /* mask for these values */
284 : :
285 : : #define RVAL_STR 020 /* Print `auxstr' field after return val */
286 : : #define RVAL_NONE 040 /* Print nothing */
287 : :
288 : : #define RVAL_DECODED 0100 /* syscall decoding finished */
289 : :
290 : : #define IOCTL_NUMBER_UNKNOWN 0
291 : : #define IOCTL_NUMBER_HANDLED 1
292 : : #define IOCTL_NUMBER_STOP_LOOKUP 010
293 : :
294 : : #define indirect_ipccall(tcp) (tcp->s_ent->sys_flags & TRACE_INDIRECT_SUBCALL)
295 : :
296 : : #if defined(ARM) || defined(AARCH64) \
297 : : || defined(I386) || defined(X32) || defined(X86_64) \
298 : : || defined(IA64) \
299 : : || defined(BFIN) \
300 : : || defined(M68K) \
301 : : || defined(MICROBLAZE) \
302 : : || defined(RISCV) \
303 : : || defined(S390) \
304 : : || defined(SH) || defined(SH64) \
305 : : || defined(SPARC) || defined(SPARC64) \
306 : : /**/
307 : : # define NEED_UID16_PARSERS 1
308 : : #else
309 : : # define NEED_UID16_PARSERS 0
310 : : #endif
311 : :
312 : : enum sock_proto {
313 : : SOCK_PROTO_UNKNOWN,
314 : : SOCK_PROTO_UNIX,
315 : : SOCK_PROTO_TCP,
316 : : SOCK_PROTO_UDP,
317 : : SOCK_PROTO_TCPv6,
318 : : SOCK_PROTO_UDPv6,
319 : : SOCK_PROTO_NETLINK
320 : : };
321 : : extern enum sock_proto get_proto_by_name(const char *);
322 : :
323 : : enum iov_decode {
324 : : IOV_DECODE_ADDR,
325 : : IOV_DECODE_STR,
326 : : IOV_DECODE_NETLINK
327 : : };
328 : :
329 : : typedef enum {
330 : : CFLAG_NONE = 0,
331 : : CFLAG_ONLY_STATS,
332 : : CFLAG_BOTH
333 : : } cflag_t;
334 : : extern const struct syscall_class syscall_classes[];
335 : : extern cflag_t cflag;
336 : : extern bool debug_flag;
337 : : extern bool Tflag;
338 : : extern bool iflag;
339 : : extern bool count_wallclock;
340 : : extern unsigned int qflag;
341 : : extern bool not_failing_only;
342 : : extern unsigned int show_fd_path;
343 : : /* are we filtering traces based on paths? */
344 : : extern struct path_set {
345 : : const char **paths_selected;
346 : : unsigned int num_selected;
347 : : } global_path_set;
348 : : #define tracing_paths (global_path_set.num_selected != 0)
349 : : extern unsigned xflag;
350 : : extern unsigned followfork;
351 : : #ifdef USE_LIBUNWIND
352 : : /* if this is true do the stack trace for every system call */
353 : : extern bool stack_trace_enabled;
354 : : #endif
355 : : extern unsigned ptrace_setoptions;
356 : : extern unsigned max_strlen;
357 : : extern unsigned os_release;
358 : : #undef KERNEL_VERSION
359 : : #define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
360 : :
361 : : extern int read_int_from_file(const char *, int *);
362 : :
363 : : extern void set_sortby(const char *);
364 : : extern void set_overhead(int);
365 : : extern void print_pc(struct tcb *);
366 : :
367 : : extern int syscall_entering_decode(struct tcb *);
368 : : extern int syscall_entering_trace(struct tcb *, unsigned int *);
369 : : extern void syscall_entering_finish(struct tcb *, int);
370 : :
371 : : extern int syscall_exiting_decode(struct tcb *, struct timeval *);
372 : : extern int syscall_exiting_trace(struct tcb *, struct timeval, int);
373 : : extern void syscall_exiting_finish(struct tcb *);
374 : :
375 : : extern void count_syscall(struct tcb *, const struct timeval *);
376 : : extern void call_summary(FILE *);
377 : :
378 : : extern void clear_regs(void);
379 : : extern int get_scno(struct tcb *);
380 : : extern kernel_ulong_t get_rt_sigframe_addr(struct tcb *);
381 : :
382 : : /**
383 : : * Convert syscall number to syscall name.
384 : : *
385 : : * @param scno Syscall number.
386 : : * @return String literal corresponding to the syscall number in case latter
387 : : * is valid; NULL otherwise.
388 : : */
389 : : extern const char *syscall_name(kernel_ulong_t scno);
390 : : extern const char *err_name(unsigned long err);
391 : :
392 : : extern bool is_erestart(struct tcb *);
393 : : extern void temporarily_clear_syserror(struct tcb *);
394 : : extern void restore_cleared_syserror(struct tcb *);
395 : :
396 : : extern void *get_tcb_priv_data(const struct tcb *);
397 : : extern int set_tcb_priv_data(struct tcb *, void *priv_data,
398 : : void (*free_priv_data)(void *));
399 : : extern void free_tcb_priv_data(struct tcb *);
400 : :
401 : : static inline unsigned long get_tcb_priv_ulong(const struct tcb *tcp)
402 : : {
403 : 950 : return (unsigned long) get_tcb_priv_data(tcp);
404 : : }
405 : :
406 : : static inline int set_tcb_priv_ulong(struct tcb *tcp, unsigned long val)
407 : : {
408 : 1014 : return set_tcb_priv_data(tcp, (void *) val, 0);
409 : : }
410 : :
411 : : extern int
412 : : umoven(struct tcb *, kernel_ulong_t addr, unsigned int len, void *laddr);
413 : : #define umove(pid, addr, objp) \
414 : : umoven((pid), (addr), sizeof(*(objp)), (void *) (objp))
415 : :
416 : : extern int
417 : : umoven_or_printaddr(struct tcb *, kernel_ulong_t addr,
418 : : unsigned int len, void *laddr);
419 : : #define umove_or_printaddr(pid, addr, objp) \
420 : : umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
421 : :
422 : : extern int
423 : : umoven_or_printaddr_ignore_syserror(struct tcb *, kernel_ulong_t addr,
424 : : unsigned int len, void *laddr);
425 : :
426 : : extern int
427 : : umovestr(struct tcb *, kernel_ulong_t addr, unsigned int len, char *laddr);
428 : :
429 : : extern int
430 : : upoken(struct tcb *, kernel_ulong_t addr, unsigned int len, const void *laddr);
431 : :
432 : : extern int upeek(int pid, unsigned long, kernel_ulong_t *);
433 : : extern int upoke(int pid, unsigned long, kernel_ulong_t);
434 : :
435 : : extern bool
436 : : print_array(struct tcb *,
437 : : kernel_ulong_t start_addr,
438 : : size_t nmemb,
439 : : void *elem_buf,
440 : : size_t elem_size,
441 : : int (*umoven_func)(struct tcb *,
442 : : kernel_ulong_t,
443 : : unsigned int,
444 : : void *),
445 : : bool (*print_func)(struct tcb *,
446 : : void *elem_buf,
447 : : size_t elem_size,
448 : : void *opaque_data),
449 : : void *opaque_data);
450 : :
451 : : #if defined ALPHA || defined IA64 || defined MIPS \
452 : : || defined SH || defined SPARC || defined SPARC64
453 : : # define HAVE_GETRVAL2
454 : : extern long getrval2(struct tcb *);
455 : : #else
456 : : # undef HAVE_GETRVAL2
457 : : #endif
458 : :
459 : : extern const char *signame(const int);
460 : : extern void pathtrace_select_set(const char *, struct path_set *);
461 : : extern bool pathtrace_match_set(struct tcb *, struct path_set *);
462 : : #define pathtrace_select(tcp) \
463 : : pathtrace_select_set(tcp, &global_path_set)
464 : : #define pathtrace_match(tcp) \
465 : : pathtrace_match_set(tcp, &global_path_set)
466 : : extern int getfdpath(struct tcb *, int, char *, unsigned);
467 : : extern unsigned long getfdinode(struct tcb *, int);
468 : : extern enum sock_proto getfdproto(struct tcb *, int);
469 : :
470 : : extern const char *xlookup(const struct xlat *, const uint64_t);
471 : : extern const char *xlat_search(const struct xlat *, const size_t, const uint64_t);
472 : :
473 : : struct dyxlat;
474 : : struct dyxlat *dyxlat_alloc(size_t nmemb);
475 : : void dyxlat_free(struct dyxlat *);
476 : : const struct xlat *dyxlat_get(const struct dyxlat *);
477 : : void dyxlat_add_pair(struct dyxlat *, uint64_t val, const char *str, size_t len);
478 : :
479 : : const struct xlat *genl_families_xlat(void);
480 : :
481 : : extern unsigned long get_pagesize(void);
482 : : extern int
483 : : string_to_uint_ex(const char *str, char **endptr,
484 : : unsigned int max_val, const char *accepted_ending);
485 : : extern int string_to_uint(const char *str);
486 : : static inline int
487 : : string_to_uint_upto(const char *const str, unsigned int max_val)
488 : : {
489 : 9517 : return string_to_uint_ex(str, NULL, max_val, NULL);
490 : : }
491 : : extern int next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits);
492 : :
493 : : /*
494 : : * Returns STR if it does not start with PREFIX,
495 : : * or a pointer to the first char in STR after PREFIX.
496 : : * The length of PREFIX is specified by PREFIX_LEN.
497 : : */
498 : : static inline const char *
499 : : str_strip_prefix_len(const char *str, const char *prefix, size_t prefix_len)
500 : : {
501 [ + + ][ + + ]: 438318 : return strncmp(str, prefix, prefix_len) ? str : str + prefix_len;
[ + + ][ + + ]
[ + + ]
502 : : }
503 : :
504 : : #define STR_STRIP_PREFIX(str, prefix) \
505 : : str_strip_prefix_len((str), (prefix), sizeof(prefix) - 1)
506 : :
507 : : #define QUOTE_0_TERMINATED 0x01
508 : : #define QUOTE_OMIT_LEADING_TRAILING_QUOTES 0x02
509 : : #define QUOTE_OMIT_TRAILING_0 0x08
510 : : #define QUOTE_FORCE_HEX 0x10
511 : :
512 : : extern int string_quote(const char *, char *, unsigned int, unsigned int);
513 : : extern int print_quoted_string(const char *, unsigned int, unsigned int);
514 : : extern int print_quoted_cstring(const char *, unsigned int);
515 : :
516 : : /* a refers to the lower numbered u_arg,
517 : : * b refers to the higher numbered u_arg
518 : : */
519 : : #ifdef WORDS_BIGENDIAN
520 : : # define ULONG_LONG(a, b) \
521 : : ((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32))
522 : : #else
523 : : # define ULONG_LONG(a, b) \
524 : : ((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32))
525 : : #endif
526 : : extern int getllval(struct tcb *, unsigned long long *, int);
527 : : extern int printllval(struct tcb *, const char *, int)
528 : : ATTRIBUTE_FORMAT((printf, 2, 0));
529 : :
530 : : extern void printaddr(kernel_ulong_t addr);
531 : : extern int printxvals(const uint64_t, const char *, const struct xlat *, ...)
532 : : ATTRIBUTE_SENTINEL;
533 : : extern int printxval_searchn(const struct xlat *xlat, size_t xlat_size,
534 : : uint64_t val, const char *dflt);
535 : : #define printxval_search(xlat__, val__, dflt__) \
536 : : printxval_searchn(xlat__, ARRAY_SIZE(xlat__), val__, dflt__)
537 : : extern int printargs(struct tcb *);
538 : : extern int printargs_u(struct tcb *);
539 : : extern int printargs_d(struct tcb *);
540 : :
541 : : extern void addflags(const struct xlat *, uint64_t);
542 : : extern int printflags_ex(uint64_t, const char *, const struct xlat *, ...)
543 : : ATTRIBUTE_SENTINEL;
544 : : extern const char *sprintflags(const char *, const struct xlat *, uint64_t);
545 : : extern const char *sprinttime(long long sec);
546 : : extern const char *sprinttime_nsec(long long sec, unsigned long long nsec);
547 : : extern const char *sprinttime_usec(long long sec, unsigned long long usec);
548 : : extern void print_symbolic_mode_t(unsigned int);
549 : : extern void print_numeric_umode_t(unsigned short);
550 : : extern void print_numeric_long_umask(unsigned long);
551 : : extern void print_dev_t(unsigned long long dev);
552 : : extern void print_abnormal_hi(kernel_ulong_t);
553 : :
554 : : extern void
555 : : dumpiov_in_msghdr(struct tcb *, kernel_ulong_t addr, kernel_ulong_t data_size);
556 : :
557 : : extern void
558 : : dumpiov_in_mmsghdr(struct tcb *, kernel_ulong_t addr);
559 : :
560 : : extern void
561 : : dumpiov_upto(struct tcb *, int len, kernel_ulong_t addr, kernel_ulong_t data_size);
562 : :
563 : : extern void
564 : : dumpstr(struct tcb *, kernel_ulong_t addr, int len);
565 : :
566 : : extern void
567 : : printstr_ex(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len,
568 : : unsigned int user_style);
569 : :
570 : : extern void
571 : : printpathn(struct tcb *, kernel_ulong_t addr, unsigned int n);
572 : :
573 : : extern void
574 : : printpath(struct tcb *, kernel_ulong_t addr);
575 : :
576 : : #define TIMESPEC_TEXT_BUFSIZE \
577 : : (sizeof(long long) * 3 * 2 + sizeof("{tv_sec=-, tv_nsec=}"))
578 : : extern void printfd(struct tcb *, int);
579 : : extern void print_sockaddr(const void *sa, int len);
580 : : extern bool
581 : : print_inet_addr(int af, const void *addr, unsigned int len, const char *var_name);
582 : : extern const char *get_sockaddr_by_inode(struct tcb *, int fd, unsigned long inode);
583 : : extern bool print_sockaddr_by_inode(struct tcb *, int fd, unsigned long inode);
584 : : extern void print_dirfd(struct tcb *, int);
585 : :
586 : : extern int
587 : : decode_sockaddr(struct tcb *, kernel_ulong_t addr, int addrlen);
588 : :
589 : : extern void printuid(const char *, const unsigned int);
590 : :
591 : : extern void
592 : : print_sigset_addr_len(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len);
593 : : extern void
594 : : print_sigset_addr(struct tcb *, kernel_ulong_t addr);
595 : :
596 : : extern const char *sprintsigmask_n(const char *, const void *, unsigned int);
597 : : #define tprintsigmask_addr(prefix, mask) \
598 : : tprints(sprintsigmask_n((prefix), (mask), sizeof(mask)))
599 : : extern void printsignal(int);
600 : :
601 : : extern void
602 : : tprint_iov_upto(struct tcb *, kernel_ulong_t len, kernel_ulong_t addr,
603 : : enum iov_decode, kernel_ulong_t data_size);
604 : :
605 : : extern void
606 : : decode_netlink(struct tcb *, int fd, kernel_ulong_t addr, kernel_ulong_t len);
607 : :
608 : : extern void tprint_open_modes(unsigned int);
609 : : extern const char *sprint_open_modes(unsigned int);
610 : :
611 : : extern void
612 : : decode_seccomp_fprog(struct tcb *, kernel_ulong_t addr);
613 : :
614 : : extern void
615 : : print_seccomp_fprog(struct tcb *, kernel_ulong_t addr, unsigned short len);
616 : :
617 : : extern void
618 : : decode_sock_fprog(struct tcb *, kernel_ulong_t addr);
619 : :
620 : : extern void
621 : : print_sock_fprog(struct tcb *, kernel_ulong_t addr, unsigned short len);
622 : :
623 : : struct strace_stat;
624 : : extern void print_struct_stat(struct tcb *, const struct strace_stat *const st);
625 : :
626 : : struct strace_statfs;
627 : :
628 : : extern void
629 : : print_struct_statfs(struct tcb *, kernel_ulong_t addr);
630 : :
631 : : extern void
632 : : print_struct_statfs64(struct tcb *, kernel_ulong_t addr, kernel_ulong_t size);
633 : :
634 : : extern void print_ifindex(unsigned int);
635 : :
636 : : struct number_set;
637 : : extern struct number_set read_set;
638 : : extern struct number_set write_set;
639 : : extern struct number_set signal_set;
640 : :
641 : : extern bool is_number_in_set(unsigned int number, const struct number_set *);
642 : : extern void qualify(const char *);
643 : : extern unsigned int qual_flags(const unsigned int);
644 : : #ifdef USE_LUAJIT
645 : : extern void set_hook_qual(unsigned int scno, unsigned int pers, bool entry_hook, bool exit_hook);
646 : : #endif
647 : :
648 : : #define DECL_IOCTL(name) \
649 : : extern int \
650 : : name ## _ioctl(struct tcb *, unsigned int request, kernel_ulong_t arg) \
651 : : /* End of DECL_IOCTL definition. */
652 : :
653 : : DECL_IOCTL(dm);
654 : : DECL_IOCTL(file);
655 : : DECL_IOCTL(fs_x);
656 : : DECL_IOCTL(nsfs);
657 : : DECL_IOCTL(ptp);
658 : : DECL_IOCTL(scsi);
659 : : DECL_IOCTL(term);
660 : : DECL_IOCTL(ubi);
661 : : DECL_IOCTL(uffdio);
662 : : #undef DECL_IOCTL
663 : :
664 : : extern int decode_sg_io_v4(struct tcb *, const kernel_ulong_t arg);
665 : :
666 : : struct nlmsghdr;
667 : :
668 : : typedef bool (*netlink_decoder_t)(struct tcb *, const struct nlmsghdr *,
669 : : kernel_ulong_t addr, unsigned int len);
670 : :
671 : : #define DECL_NETLINK(name) \
672 : : extern bool \
673 : : decode_netlink_ ## name(struct tcb *, const struct nlmsghdr *, \
674 : : kernel_ulong_t addr, unsigned int len) \
675 : : /* End of DECL_NETLINK definition. */
676 : :
677 : : DECL_NETLINK(crypto);
678 : : DECL_NETLINK(selinux);
679 : : DECL_NETLINK(sock_diag);
680 : :
681 : : extern int tv_nz(const struct timeval *);
682 : : extern int tv_cmp(const struct timeval *, const struct timeval *);
683 : : extern double tv_float(const struct timeval *);
684 : : extern void tv_add(struct timeval *, const struct timeval *, const struct timeval *);
685 : : extern void tv_sub(struct timeval *, const struct timeval *, const struct timeval *);
686 : : extern void tv_mul(struct timeval *, const struct timeval *, int);
687 : : extern void tv_div(struct timeval *, const struct timeval *, int);
688 : :
689 : : #ifdef USE_LIBUNWIND
690 : : extern void unwind_init(void);
691 : : extern void unwind_tcb_init(struct tcb *);
692 : : extern void unwind_tcb_fin(struct tcb *);
693 : : extern void unwind_cache_invalidate(struct tcb *);
694 : : extern void unwind_print_stacktrace(struct tcb *);
695 : : extern void unwind_capture_stacktrace(struct tcb *);
696 : : #endif
697 : :
698 : : static inline void
699 : : printstrn(struct tcb *tcp, kernel_ulong_t addr, kernel_ulong_t len)
700 : : {
701 : 240044 : printstr_ex(tcp, addr, len, 0);
702 : : }
703 : :
704 : : static inline void
705 : : printstr(struct tcb *tcp, kernel_ulong_t addr)
706 : : {
707 : 9670 : printstr_ex(tcp, addr, -1, QUOTE_0_TERMINATED);
708 : : }
709 : :
710 : : static inline int
711 : : printflags64(const struct xlat *x, uint64_t flags, const char *dflt)
712 : : {
713 : 144010 : return printflags_ex(flags, dflt, x, NULL);
714 : : }
715 : :
716 : : static inline int
717 : : printflags(const struct xlat *x, unsigned int flags, const char *dflt)
718 : : {
719 : 68464 : return printflags64(x, flags, dflt);
720 : : }
721 : :
722 : : static inline int
723 : : printxval64(const struct xlat *x, const uint64_t val, const char *dflt)
724 : : {
725 : 958 : return printxvals(val, dflt, x, NULL);
726 : : }
727 : :
728 : : static inline int
729 : : printxval(const struct xlat *x, const unsigned int val, const char *dflt)
730 : : {
731 : 250692 : return printxvals(val, dflt, x, NULL);
732 : : }
733 : :
734 : : static inline void
735 : : tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr,
736 : : enum iov_decode decode_iov)
737 : : {
738 : 233019 : tprint_iov_upto(tcp, len, addr, decode_iov, -1);
739 : : }
740 : :
741 : : #ifdef ALPHA
742 : : typedef struct {
743 : : int tv_sec, tv_usec;
744 : : } timeval32_t;
745 : :
746 : : extern void print_timeval32_t(const timeval32_t *);
747 : : extern void printrusage32(struct tcb *, kernel_ulong_t);
748 : : extern const char *sprint_timeval32(struct tcb *, kernel_ulong_t addr);
749 : : extern void print_timeval32(struct tcb *, kernel_ulong_t addr);
750 : : extern void print_timeval32_utimes(struct tcb *, kernel_ulong_t addr);
751 : : extern void print_itimerval32(struct tcb *, kernel_ulong_t addr);
752 : : #endif
753 : :
754 : : #ifdef HAVE_STRUCT_USER_DESC
755 : : extern void print_user_desc(struct tcb *, kernel_ulong_t addr);
756 : : #endif
757 : :
758 : : /* Strace log generation machinery.
759 : : *
760 : : * printing_tcp: tcb which has incomplete line being printed right now.
761 : : * NULL if last line has been completed ('\n'-terminated).
762 : : * printleader(tcp) examines it, finishes incomplete line if needed,
763 : : * the sets it to tcp.
764 : : * line_ended() clears printing_tcp and resets ->curcol = 0.
765 : : * tcp->curcol == 0 check is also used to detect completeness
766 : : * of last line, since in -ff mode just checking printing_tcp for NULL
767 : : * is not enough.
768 : : *
769 : : * If you change this code, test log generation in both -f and -ff modes
770 : : * using:
771 : : * strace -oLOG -f[f] test/threaded_execve
772 : : * strace -oLOG -f[f] test/sigkill_rain
773 : : * strace -oLOG -f[f] -p "`pidof web_browser`"
774 : : */
775 : : extern struct tcb *printing_tcp;
776 : : extern void printleader(struct tcb *);
777 : : extern void line_ended(void);
778 : : extern void tabto(void);
779 : : extern void tprintf(const char *fmt, ...) ATTRIBUTE_FORMAT((printf, 1, 2));
780 : : extern void tprints(const char *str);
781 : : extern void tprintf_comment(const char *fmt, ...) ATTRIBUTE_FORMAT((printf, 1, 2));
782 : : extern void tprints_comment(const char *str);
783 : :
784 : : #if SUPPORTED_PERSONALITIES > 1
785 : : extern void set_personality(int personality);
786 : : extern unsigned current_personality;
787 : : #else
788 : : # define set_personality(personality) ((void)0)
789 : : # define current_personality 0
790 : : #endif
791 : :
792 : : #if SUPPORTED_PERSONALITIES == 1
793 : : # define current_wordsize PERSONALITY0_WORDSIZE
794 : : # define current_klongsize PERSONALITY0_KLONGSIZE
795 : : #else
796 : : # if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_WORDSIZE == PERSONALITY1_WORDSIZE
797 : : # define current_wordsize PERSONALITY0_WORDSIZE
798 : : # else
799 : : extern unsigned current_wordsize;
800 : : # endif
801 : : # if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_KLONGSIZE == PERSONALITY1_KLONGSIZE
802 : : # define current_klongsize PERSONALITY0_KLONGSIZE
803 : : # else
804 : : extern unsigned current_klongsize;
805 : : # endif
806 : : #endif
807 : :
808 : : #define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG \
809 : : (SIZEOF_KERNEL_LONG_T > 4 \
810 : : && (SIZEOF_LONG < SIZEOF_KERNEL_LONG_T || !defined(current_wordsize)))
811 : :
812 : : #define DECL_PRINTNUM(name) \
813 : : extern bool \
814 : : printnum_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \
815 : : ATTRIBUTE_FORMAT((printf, 3, 0)) \
816 : : /* End of DECL_PRINTNUM definition. */
817 : :
818 : : DECL_PRINTNUM(short);
819 : : DECL_PRINTNUM(int);
820 : : DECL_PRINTNUM(int64);
821 : : #undef DECL_PRINTNUM
822 : :
823 : : #define DECL_PRINTNUM_ADDR(name) \
824 : : extern bool \
825 : : printnum_addr_ ## name(struct tcb *, kernel_ulong_t addr) \
826 : : /* End of DECL_PRINTNUM_ADDR definition. */
827 : :
828 : : DECL_PRINTNUM_ADDR(int);
829 : : DECL_PRINTNUM_ADDR(int64);
830 : : #undef DECL_PRINTNUM_ADDR
831 : :
832 : : #ifndef current_wordsize
833 : : extern bool
834 : : printnum_long_int(struct tcb *, kernel_ulong_t addr,
835 : : const char *fmt_long, const char *fmt_int)
836 : : ATTRIBUTE_FORMAT((printf, 3, 0))
837 : : ATTRIBUTE_FORMAT((printf, 4, 0));
838 : : extern bool printnum_addr_long_int(struct tcb *, kernel_ulong_t addr);
839 : : # define printnum_slong(tcp, addr) \
840 : : printnum_long_int((tcp), (addr), "%" PRId64, "%d")
841 : : # define printnum_ulong(tcp, addr) \
842 : : printnum_long_int((tcp), (addr), "%" PRIu64, "%u")
843 : : # define printnum_ptr(tcp, addr) \
844 : : printnum_addr_long_int((tcp), (addr))
845 : : #elif current_wordsize > 4
846 : : # define printnum_slong(tcp, addr) \
847 : : printnum_int64((tcp), (addr), "%" PRId64)
848 : : # define printnum_ulong(tcp, addr) \
849 : : printnum_int64((tcp), (addr), "%" PRIu64)
850 : : # define printnum_ptr(tcp, addr) \
851 : : printnum_addr_int64((tcp), (addr))
852 : : #else /* current_wordsize == 4 */
853 : : # define printnum_slong(tcp, addr) \
854 : : printnum_int((tcp), (addr), "%d")
855 : : # define printnum_ulong(tcp, addr) \
856 : : printnum_int((tcp), (addr), "%u")
857 : : # define printnum_ptr(tcp, addr) \
858 : : printnum_addr_int((tcp), (addr))
859 : : #endif
860 : :
861 : : #ifndef current_klongsize
862 : : extern bool printnum_addr_klong_int(struct tcb *, kernel_ulong_t addr);
863 : : # define printnum_kptr(tcp, addr) \
864 : : printnum_addr_klong_int((tcp), (addr))
865 : : #elif current_klongsize > 4
866 : : # define printnum_kptr(tcp, addr) \
867 : : printnum_addr_int64((tcp), (addr))
868 : : #else /* current_klongsize == 4 */
869 : : # define printnum_kptr(tcp, addr) \
870 : : printnum_addr_int((tcp), (addr))
871 : : #endif
872 : :
873 : : #define DECL_PRINTPAIR(name) \
874 : : extern bool \
875 : : printpair_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \
876 : : ATTRIBUTE_FORMAT((printf, 3, 0)) \
877 : : /* End of DECL_PRINTPAIR definition. */
878 : :
879 : : DECL_PRINTPAIR(int);
880 : : DECL_PRINTPAIR(int64);
881 : : #undef DECL_PRINTPAIR
882 : :
883 : : static inline kernel_long_t
884 : : truncate_klong_to_current_wordsize(const kernel_long_t v)
885 : : {
886 : : #if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
887 [ + + ][ + + ]: 31 : if (current_wordsize < sizeof(v)) {
[ + + ]
888 : 18 : return (int) v;
889 : : } else
890 : : #endif
891 : : {
892 : : return v;
893 : : }
894 : : }
895 : :
896 : : static inline kernel_ulong_t
897 : : truncate_kulong_to_current_wordsize(const kernel_ulong_t v)
898 : : {
899 : : #if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
900 [ + + ][ + + ]: 86 : if (current_wordsize < sizeof(v)) {
901 : 43 : return (unsigned int) v;
902 : : } else
903 : : #endif
904 : : {
905 : : return v;
906 : : }
907 : : }
908 : :
909 : : /*
910 : : * Cast a pointer or a pointer-sized integer to kernel_ulong_t.
911 : : */
912 : : #define ptr_to_kulong(v) ((kernel_ulong_t) (unsigned long) (v))
913 : :
914 : : /*
915 : : * Zero-extend a signed integer type to unsigned long long.
916 : : */
917 : : #define zero_extend_signed_to_ull(v) \
918 : : (sizeof(v) == sizeof(char) ? (unsigned long long) (unsigned char) (v) : \
919 : : sizeof(v) == sizeof(short) ? (unsigned long long) (unsigned short) (v) : \
920 : : sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \
921 : : sizeof(v) == sizeof(long) ? (unsigned long long) (unsigned long) (v) : \
922 : : (unsigned long long) (v))
923 : :
924 : : /*
925 : : * Sign-extend an unsigned integer type to long long.
926 : : */
927 : : #define sign_extend_unsigned_to_ll(v) \
928 : : (sizeof(v) == sizeof(char) ? (long long) (char) (v) : \
929 : : sizeof(v) == sizeof(short) ? (long long) (short) (v) : \
930 : : sizeof(v) == sizeof(int) ? (long long) (int) (v) : \
931 : : sizeof(v) == sizeof(long) ? (long long) (long) (v) : \
932 : : (long long) (v))
933 : :
934 : : extern const struct_sysent sysent0[];
935 : : extern const char *const errnoent0[];
936 : : extern const char *const signalent0[];
937 : : extern const struct_ioctlent ioctlent0[];
938 : :
939 : : extern const char *const *errnoent_vec[SUPPORTED_PERSONALITIES];
940 : : extern const char *const *signalent_vec[SUPPORTED_PERSONALITIES];
941 : : extern const struct_ioctlent *const ioctlent_vec[SUPPORTED_PERSONALITIES];
942 : : extern const unsigned int nerrnoent_vec[SUPPORTED_PERSONALITIES];
943 : : extern const unsigned int nsignalent_vec[SUPPORTED_PERSONALITIES];
944 : : extern const unsigned int nioctlent_vec[SUPPORTED_PERSONALITIES];
945 : :
946 : : #if SUPPORTED_PERSONALITIES > 1
947 : : extern const struct_sysent *sysent;
948 : : extern const char *const *errnoent;
949 : : extern const char *const *signalent;
950 : : extern const struct_ioctlent *ioctlent;
951 : : #else
952 : : # define sysent sysent0
953 : : # define errnoent errnoent0
954 : : # define signalent signalent0
955 : : # define ioctlent ioctlent0
956 : : #endif
957 : :
958 : : extern unsigned nsyscalls;
959 : : extern unsigned nerrnos;
960 : : extern unsigned nsignals;
961 : : extern unsigned nioctlents;
962 : :
963 : : extern const unsigned int nsyscall_vec[SUPPORTED_PERSONALITIES];
964 : : extern const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES];
965 : : extern struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES];
966 : :
967 : : #ifdef IN_MPERS_BOOTSTRAP
968 : : /* Transform multi-line MPERS_PRINTER_DECL statements to one-liners. */
969 : : # define MPERS_PRINTER_DECL(type, name, ...) MPERS_PRINTER_DECL(type, name, __VA_ARGS__)
970 : : #else /* !IN_MPERS_BOOTSTRAP */
971 : : # if SUPPORTED_PERSONALITIES > 1
972 : : # include "printers.h"
973 : : # else
974 : : # include "native_printer_decls.h"
975 : : # endif
976 : : # define MPERS_PRINTER_DECL(type, name, ...) type MPERS_FUNC_NAME(name)(__VA_ARGS__)
977 : : #endif /* !IN_MPERS_BOOTSTRAP */
978 : :
979 : : /* Checks that sysent[scno] is not out of range. */
980 : : static inline bool
981 : : scno_in_range(kernel_ulong_t scno)
982 : : {
983 : 37519079 : return scno < nsyscalls;
984 : : }
985 : :
986 : : /*
987 : : * Checks whether scno is not out of range,
988 : : * its corresponding sysent[scno].sys_func is non-NULL,
989 : : * and its sysent[scno].sys_flags has no TRACE_INDIRECT_SUBCALL flag set.
990 : : */
991 : : static inline bool
992 : : scno_is_valid(kernel_ulong_t scno)
993 : : {
994 : 37085587 : return scno_in_range(scno)
995 [ + - ][ + - ]: 37085581 : && sysent[scno].sys_func
996 [ + + ][ - + ]: 74171168 : && !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL);
[ + + ][ + + ]
997 : : }
998 : :
999 : : #define MPERS_FUNC_NAME__(prefix, name) prefix ## name
1000 : : #define MPERS_FUNC_NAME_(prefix, name) MPERS_FUNC_NAME__(prefix, name)
1001 : : #define MPERS_FUNC_NAME(name) MPERS_FUNC_NAME_(MPERS_PREFIX, name)
1002 : :
1003 : : #define SYS_FUNC_NAME(syscall_name) MPERS_FUNC_NAME(syscall_name)
1004 : :
1005 : : #define SYS_FUNC(syscall_name) int SYS_FUNC_NAME(sys_ ## syscall_name)(struct tcb *tcp)
1006 : :
1007 : : #endif /* !STRACE_DEFS_H */
|