├── empty.h ├── debian ├── compat ├── strace.docs ├── source │ └── format ├── strace.manpages ├── strace.examples ├── strace64.manpages ├── strace.install ├── strace-udeb.install ├── strace64.install └── watch ├── linux ├── 32 │ └── ioctls_inc.h ├── userent.h ├── arch_regs.h ├── aarch64 │ ├── signalent1.h │ ├── ioctls_inc0.h │ ├── ioctls_arch1.h │ ├── ioctls_inc1.h │ ├── syscallent1.h │ ├── arch_sigreturn.c │ ├── errnoent1.h │ ├── arch_regs.h │ ├── ioctls_arch0.h │ └── get_error.c ├── powerpc64 │ ├── errnoent1.h │ ├── signalent1.h │ ├── userent.h │ ├── arch_regs.h │ ├── errnoent.h │ ├── get_error.c │ ├── ioctls_inc0.h │ ├── getregs_old.c │ ├── ioctls_arch0.h │ ├── ioctls_arch1.h │ ├── ioctls_inc1.h │ ├── syscallent1.h │ ├── arch_sigreturn.c │ ├── get_syscall_args.c │ └── arch_regs.c ├── s390x │ ├── get_scno.c │ ├── arch_regs.h │ ├── get_error.c │ ├── ioctls_inc0.h │ ├── ioctls_arch0.h │ ├── arch_sigreturn.c │ ├── get_syscall_args.c │ └── arch_regs.c ├── sh │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── arch_getrval2.c │ ├── get_syscall_result.c │ ├── get_error.c │ ├── userent0.h │ └── get_syscall_args.c ├── sparc │ ├── userent.h │ ├── ioctls_inc0.h │ ├── arch_getrval2.c │ ├── arch_regs.c │ ├── get_scno.c │ ├── get_error.c │ ├── arch_regs.h │ └── get_syscall_args.c ├── sparc64 │ ├── errnoent1.h │ ├── signalent1.h │ ├── arch_regs.h │ ├── errnoent.h │ ├── ioctls_inc1.h │ ├── signalent.h │ ├── ioctls_inc0.h │ ├── arch_getrval2.c │ ├── arch_sigreturn.c │ ├── ioctls_arch0.h │ ├── get_syscall_args.c │ ├── arch_regs.c │ ├── syscallent1.h │ ├── userent.h │ └── get_error.c ├── x32 │ ├── get_scno.c │ ├── arch_regs.h │ ├── get_error.c │ ├── ioctls_inc1.h │ ├── userent.h │ ├── ioctls_arch0.h │ ├── ioctls_arch1.h │ ├── arch_sigreturn.c │ ├── get_syscall_args.c │ ├── errnoent1.h │ ├── signalent1.h │ ├── syscallent1.h │ └── arch_regs.c ├── alpha │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── arch_regs.h │ ├── arch_getrval2.c │ ├── get_syscall_result.c │ ├── get_error.c │ ├── get_syscall_args.c │ └── arch_sigreturn.c ├── arc │ ├── ioctls_inc0.h │ ├── ioctls_arch0.h │ ├── arch_regs.c │ ├── get_scno.c │ ├── syscallent.h │ ├── get_error.c │ └── get_syscall_args.c ├── arm │ ├── arch_regs.h │ ├── ioctls_inc0.h │ ├── ioctls_arch0.h │ ├── arch_regs.c │ ├── get_error.c │ └── get_syscall_args.c ├── avr32 │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── get_scno.c │ ├── get_error.c │ ├── get_syscall_args.c │ └── ioctls_arch0.h ├── bfin │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── get_syscall_result.c │ ├── get_scno.c │ ├── userent.h │ ├── get_error.c │ └── get_syscall_args.c ├── crisv32 │ ├── get_scno.c │ ├── get_error.c │ ├── arch_sigreturn.c │ ├── get_syscall_args.c │ ├── get_syscall_result.c │ └── arch_regs.c ├── hppa │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── arch_regs.h │ ├── get_syscall_result.c │ ├── get_scno.c │ ├── get_error.c │ └── get_syscall_args.c ├── i386 │ ├── ioctls_inc0.h │ ├── arch_regs.h │ ├── get_scno.c │ ├── arch_regs.c │ ├── get_error.c │ ├── get_syscall_args.c │ ├── userent.h │ └── userent0.h ├── ia64 │ ├── ioctls_inc0.h │ ├── arch_getrval2.c │ ├── arch_regs.h │ ├── get_scno.c │ ├── arch_regs.c │ ├── arch_sigreturn.c │ ├── ioctls_arch0.h │ └── get_error.c ├── m68k │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── get_syscall_result.c │ ├── get_scno.c │ ├── get_error.c │ └── get_syscall_args.c ├── metag │ ├── ioctls_inc0.h │ ├── ioctls_arch0.h │ ├── arch_regs.c │ ├── get_scno.c │ ├── syscallent.h │ ├── get_error.c │ └── get_syscall_args.c ├── nios2 │ ├── ioctls_inc0.h │ ├── ioctls_arch0.h │ ├── arch_regs.c │ ├── syscallent.h │ ├── get_scno.c │ └── get_syscall_args.c ├── or1k │ ├── ioctls_inc0.h │ ├── ioctls_arch0.h │ ├── arch_regs.c │ ├── syscallent.h │ ├── get_scno.c │ ├── get_error.c │ └── get_syscall_args.c ├── powerpc │ ├── ioctls_inc0.h │ ├── arch_regs.h │ ├── errnoent.h │ ├── arch_regs.c │ ├── get_scno.c │ ├── get_error.c │ └── get_syscall_args.c ├── s390 │ ├── ioctls_inc0.h │ ├── arch_regs.h │ ├── get_scno.c │ ├── arch_regs.c │ ├── get_error.c │ ├── userent1.h │ ├── arch_sigreturn.c │ └── get_syscall_args.c ├── sh64 │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── get_syscall_result.c │ ├── get_scno.c │ ├── get_error.c │ └── get_syscall_args.c ├── tile │ ├── ioctls_inc0.h │ ├── ioctls_inc1.h │ ├── arch_regs.h │ ├── errnoent1.h │ ├── signalent1.h │ ├── ioctls_arch0.h │ ├── ioctls_arch1.h │ ├── arch_regs.c │ ├── syscallent.h │ ├── syscallent1.h │ ├── get_syscall_args.c │ ├── arch_sigreturn.c │ └── get_scno.c ├── x86_64 │ ├── ioctls_arch2.h │ ├── ioctls_inc0.h │ ├── ioctls_arch1.h │ ├── ioctls_inc1.h │ ├── ioctls_inc2.h │ ├── errnoent1.h │ ├── errnoent2.h │ ├── signalent2.h │ ├── signalent1.h │ ├── syscallent2.h │ ├── arch_regs.h │ ├── syscallent1.h │ └── userent.h ├── xtensa │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── get_syscall_result.c │ ├── get_scno.c │ └── get_error.c ├── microblaze │ ├── ioctls_inc0.h │ ├── arch_regs.c │ ├── ioctls_arch0.h │ ├── get_syscall_result.c │ ├── get_scno.c │ ├── get_error.c │ ├── get_syscall_args.c │ └── arch_sigreturn.c ├── userent0.h ├── asm_stat.h ├── crisv10 │ ├── arch_regs.c │ ├── get_syscall_result.c │ ├── get_scno.c │ ├── get_error.c │ ├── arch_sigreturn.c │ └── get_syscall_args.c ├── mips │ ├── .gitignore │ ├── arch_getrval2.c │ ├── ioctls_inc0.h │ ├── syscallent.h │ ├── arch_regs.c │ ├── get_error.c │ ├── genstub.sh │ └── get_scno.c ├── sock_diag.h ├── arch_sigreturn.c └── dummy_check.sh ├── tests ├── filter-unavailable.expected ├── mmap64.c ├── count-f.expected ├── ksysent.test ├── strace-T.expected ├── stack-fcall-0.c ├── stack-fcall-1.c ├── stack-fcall-2.c ├── memfd_create.expected ├── oldselect.expected ├── pipe.expected ├── stat.test ├── lstat.test ├── stack-fcall-3.c ├── stat64.test ├── fanotify_mark.expected ├── fcntl64.test ├── fstat64.test ├── fstatat64.test ├── lstat64.test ├── signalfd.expected ├── _newselect.test ├── eventfd.expected ├── faccessat.test ├── newfstatat.test ├── execve-v.c ├── ipc_msg.test ├── ipc_sem.test ├── ipc_shm.test ├── readlinkat.test ├── stack-fcall.c ├── uid16.test ├── vfork-f.test ├── execveat-v.c ├── fcntl.test ├── tee.test ├── uid32.test ├── acct.test ├── dup.test ├── dup2.test ├── dup3.test ├── linkat.test ├── mlock2.test ├── splice.test ├── time.test ├── alarm.test ├── chmod.test ├── chroot.test ├── creat.test ├── execveat.test ├── fchmod.test ├── flock.test ├── fsync.test ├── getcwd.test ├── mknod.test ├── preadv.test ├── pselect6.test ├── rename.test ├── renameat.test ├── select.test ├── syslog.test ├── truncate.test ├── umask.test ├── fchmodat.test ├── fchownat.test ├── fdatasync.test ├── ftruncate.test ├── getrusage.test ├── mincore.test ├── mkdirat.test ├── pwritev.test ├── readlink.test ├── sendfile.test ├── sigaltstack.expected ├── sysinfo.test ├── truncate64.test ├── unlinkat.test ├── ftruncate64.test ├── membarrier.test ├── openat.test ├── rt_sigprocmask.test ├── sendfile64.test ├── sethostname.test ├── timer_create.test ├── times.test ├── userfaultfd.test ├── xattr.expected ├── copy_file_range.test ├── epoll_create1.test ├── getrandom.test ├── open.test ├── rt_sigpending.test ├── sync_file_range.test ├── sync_file_range2.test ├── vmsplice.test ├── rt_sigtimedwait.test ├── statx.sh ├── seccomp.test ├── inet-cmsg.test ├── rt_sigqueueinfo.test ├── rt_sigsuspend.test ├── times-fail.test ├── execveat-v.test ├── readdir.test ├── rt_tgsigqueueinfo.test ├── swap.test ├── getdents.test ├── getdents64.test ├── xetpgid.test ├── strace-r.expected ├── xetitimer.test ├── fork-f.test ├── nanosleep.test ├── strace-r.test ├── mmap64.test ├── readv.test ├── strace-T.test ├── getxxid.test ├── mmsg.test ├── recvmsg.test ├── xetpriority.test ├── eventfd.test ├── sigaction.test ├── xettimeofday.test ├── signalfd.test ├── umovestr.test ├── oldselect.test ├── sched_xetparam.test ├── sigaltstack.test ├── xattr.test ├── fanotify_mark.test ├── file_handle.test ├── memfd_create.test ├── preadv-pwritev.test ├── wait.test ├── xet_robust_list.test ├── aio.test ├── caps.test ├── strace-f.test ├── count-f.test ├── sched_xetaffinity.test ├── uio.test ├── clock_nanosleep.test ├── ip_mreq.test ├── sched_xetscheduler.test ├── timer_xettime.test ├── clock_xettime.test ├── bpf.test ├── ipc.sh ├── net.test ├── timerfd_xettime.test ├── umask.c ├── ipc_msgbuf.test ├── mq.test ├── sched_get_priority_mxx.test ├── filter-unavailable.test ├── adjtimex.test ├── get_page_size.c ├── personality.test ├── umount.test ├── umount2.test ├── dumpio.test ├── ipc_msgbuf.expected ├── run.sh ├── uio.expected ├── ppoll.test ├── sched_xetattr.test ├── statfs.expected ├── pipe.test ├── umovestr.expected ├── ioctl.test ├── llseek.test ├── lseek.test ├── memfd_create.c ├── restart_syscall.test ├── umovestr2.test ├── sigaltstack.c ├── times-fail.c ├── dup.c ├── mq.expected ├── statfs.test ├── execve.test ├── sun_path.test ├── execve-v.test ├── fanotify_mark.c ├── uname.test ├── poll.test ├── utimensat.test ├── fstat.test ├── opipe.test ├── read-write.test ├── strace-t.test ├── pread64-pwrite64.test ├── strace-tt.test ├── dumpio.expected ├── strace-ttt.test ├── utime.test └── uid.test ├── xlat ├── fdflags.in ├── bpf_src.in ├── clockflags.in ├── sigemt_codes.in ├── sigprof_codes.in ├── sigsys_codes.in ├── sockipxoptions.in ├── sockrawoptions.in ├── bpf_miscop.in ├── bsg_protocol.in ├── mlock_flags.in ├── bpf_rval.in ├── semop_flags.in ├── uffd_flags.in ├── aclipc.in ├── bootflags1.in ├── evdev_autorepeat.in ├── sched_flags.in ├── v4l2_capture_modes.in ├── bpf_size.in ├── delete_module_flags.in ├── evdev_snd.in ├── inotify_init_flags.in ├── mempolicyflags.in ├── mremap_flags.in ├── pr_tsc.in ├── shm_flags.in ├── sock_type_flags.in ├── xattrflags.in ├── getrandom_flags.in ├── ioctl_dirs.in ├── mctl_sync.in ├── move_pages_flags.in ├── priorities.in ├── quotatypes.in ├── seccomp_filter_flags.in ├── sigaltstack_flags.in ├── tcflsh_options.in ├── v4l2_streaming_capabilities.in ├── evdev_ff_status.in ├── ipc_msg_flags.in ├── memfd_create_flags.in ├── pr_mce_kill.in ├── resource_flags.in ├── tcxonc_options.in ├── usagewho.in ├── v4l2_memories.in ├── itimer_which.in ├── pr_unalign_flags.in ├── scmvals.in ├── shm_resource_flags.in ├── ubi_volume_props.in ├── cpuclocknames.in ├── epollctls.in ├── f_owner_types.in ├── lockfcmds.in ├── mbindflags.in ├── membarrier_cmds.in ├── mlockall_flags.in ├── mtd_otp_options.in ├── open_access_modes.in ├── v4l2_input_types.in ├── access_flags.in ├── archvals.in ├── bpf_map_update_elem_flags.in ├── evdev_sync.in ├── if_dqinfo_flags.in ├── rename_flags.in ├── seccomp_ops.in ├── cacheflush_scope.in ├── policies.in ├── sigprocmaskcmds.in ├── ubi_volume_types.in ├── whence_codes.in ├── f_seals.in ├── kexec_load_flags.in ├── module_init_flags.in ├── ptp_flags_options.in ├── quota_formats.in ├── shutdown_modes.in ├── sigsegv_codes.in ├── sigtrap_codes.in ├── umount_flags.in ├── v4l2_format_description_flags.in ├── blkpg_ops.in ├── if_dqinfo_valid.in ├── loop_flags_options.in ├── sigev_value.in ├── splice_flags.in ├── adjtimex_state.in ├── bpf_mode.in ├── fcntl64cmds.in ├── ioprio_who.in ├── modetypes.in ├── msgctl_flags.in ├── mtd_flags_options.in ├── mtd_mode_options.in ├── pr_mce_kill_policy.in ├── seccomp_mode.in ├── xfs_dqblk_flags.in ├── epollflags.in ├── sram_alloc_flags.in ├── sysctl_net_unix.in ├── sysmips_operations.in ├── bpf_class.in ├── evdev_misc.in ├── kexec_file_load_flags.in ├── sigbus_codes.in ├── sigpoll_codes.in ├── futexwakeops.in ├── packet_mreq_type.in ├── sg_io_dxfer_direction.in ├── bsg_subprotocol.in ├── fan_classes.in ├── ioprio_class.in ├── notifyflags.in ├── socktypes.in ├── v4l2_framesize_types.in ├── schedulers.in ├── sigchld_codes.in ├── sync_file_range_flags.in ├── v4l2_frameinterval_types.in ├── waitid_types.in ├── sfd_flags.in ├── shmctl_flags.in ├── cap_version.in ├── dirent_types.in ├── kcmp_types.in ├── mmap_prot.in ├── perf_event_open_flags.in ├── pr_cap_ambient.in ├── seccomp_ret_action.in ├── fan_init_flags.in ├── flockcmds.in ├── mtd_nandecc_options.in ├── swap_flags.in ├── at_flags.in ├── bpf_op_jmp.in ├── efd_flags.in ├── futexwakecmps.in ├── mtd_file_mode_options.in ├── advise.in ├── bootflags2.in ├── bt_protocols.in ├── evdev_relative_axes.in ├── mtd_type_options.in ├── sigfpe_codes.in ├── sigill_codes.in ├── af_packet_types.in ├── pollflags.in ├── bpf_commands.in ├── cap_mask1.in ├── evdev_ev.in ├── if_dqblk_valid.in ├── bpf_prog_types.in ├── falloc_flags.in ├── modem_flags.in ├── bpf_op_alu.in ├── evdev_leds.in ├── ip_cmsg_types.in ├── evdev_prop.in ├── semctl_flags.in ├── xfs_quota_flags.in ├── v4l2_buf_flags.in ├── siginfo_codes.in ├── sysctl_root.in ├── wait4_options.in ├── loop_crypt_type_options.in ├── setsockipv6options.in ├── v4l2_control_flags.in ├── bpf_map_types.in ├── epollevents.in ├── v4l2_colorspaces.in ├── adjtimex_modes.in ├── ptrace_events.in ├── v4l2_fields.in ├── personality_flags.in ├── evdev_ff_types.in ├── key_spec.in ├── adjtimex_status.in ├── iffflags.in ├── timerfdflags.in ├── v4l2_control_classes.in ├── sysctl_net_ipv6.in ├── v4l2_control_types.in ├── fan_mark_flags.in ├── clocknames.in ├── getsockipv6options.in ├── secbits.in ├── fan_event_flags.in ├── sysctl_net.in ├── resources.in ├── ptrace_setoptions_flags.in ├── bootflags3.in ├── msg_flags.in ├── icmpfilterflags.in ├── madvise_cmds.in ├── evdev_mtslots.in ├── sysctl_net_ipv6_route.in ├── atomic_ops.in ├── evdev_switch.in ├── key_reqkeys.in ├── syslog_action_type.in ├── v4l2_buf_types.in ├── personality_types.in ├── baud_options.in ├── nt_descriptor_types.in ├── openmodessol.in ├── pr_set_mm.in ├── sigact_flags.in ├── kexec_arch_values.in ├── netlink_protocols.in ├── sysctl_vm.in └── sockpacketoptions.in ├── uid16.c ├── qemu_multiarch_testing ├── .gitignore └── hdc.dir │ ├── init │ └── init2 ├── printsiginfo.h ├── AUTHORS ├── seccomp_fprog.h ├── caps1.h ├── chdir.c ├── regs.h ├── iopl.c ├── native_defs.h ├── umask.c ├── ioperm.c ├── generate_sen.sh ├── readahead.c ├── umount.c ├── test ├── .gitignore ├── sig.c ├── clone.c └── Makefile ├── getcwd.c ├── getcpu.c ├── fchownat.c ├── exit.c ├── .mailmap ├── getrandom.c ├── sram_alloc.c ├── utime.c ├── hostname.c ├── bootstrap ├── sigreturn.c ├── access.c ├── swapon.c └── generate_mpers_am.sh /empty.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /debian/strace.docs: -------------------------------------------------------------------------------- 1 | NEWS 2 | -------------------------------------------------------------------------------- /linux/userent.h: -------------------------------------------------------------------------------- 1 | /* nothing */ 2 | -------------------------------------------------------------------------------- /tests/filter-unavailable.expected: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /xlat/fdflags.in: -------------------------------------------------------------------------------- 1 | FD_CLOEXEC 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/strace.manpages: -------------------------------------------------------------------------------- 1 | strace.1 2 | -------------------------------------------------------------------------------- /linux/arch_regs.h: -------------------------------------------------------------------------------- 1 | /* nothing */ 2 | -------------------------------------------------------------------------------- /tests/mmap64.c: -------------------------------------------------------------------------------- 1 | #include "mmap.c" 2 | -------------------------------------------------------------------------------- /xlat/bpf_src.in: -------------------------------------------------------------------------------- 1 | BPF_K 2 | BPF_X 3 | -------------------------------------------------------------------------------- /xlat/clockflags.in: -------------------------------------------------------------------------------- 1 | TIMER_ABSTIME 2 | -------------------------------------------------------------------------------- /xlat/sigemt_codes.in: -------------------------------------------------------------------------------- 1 | EMT_TAGOVF 1 2 | -------------------------------------------------------------------------------- /xlat/sigprof_codes.in: -------------------------------------------------------------------------------- 1 | PROF_SIG 2 | -------------------------------------------------------------------------------- /xlat/sigsys_codes.in: -------------------------------------------------------------------------------- 1 | SYS_SECCOMP 1 2 | -------------------------------------------------------------------------------- /xlat/sockipxoptions.in: -------------------------------------------------------------------------------- 1 | IPX_TYPE 2 | -------------------------------------------------------------------------------- /xlat/sockrawoptions.in: -------------------------------------------------------------------------------- 1 | ICMP_FILTER 2 | -------------------------------------------------------------------------------- /debian/strace.examples: -------------------------------------------------------------------------------- 1 | strace-graph 2 | -------------------------------------------------------------------------------- /debian/strace64.manpages: -------------------------------------------------------------------------------- 1 | strace64.1 2 | -------------------------------------------------------------------------------- /xlat/bpf_miscop.in: -------------------------------------------------------------------------------- 1 | BPF_TAX 2 | BPF_TXA 3 | -------------------------------------------------------------------------------- /xlat/bsg_protocol.in: -------------------------------------------------------------------------------- 1 | BSG_PROTOCOL_SCSI 2 | -------------------------------------------------------------------------------- /xlat/mlock_flags.in: -------------------------------------------------------------------------------- 1 | MLOCK_ONFAULT 1 2 | -------------------------------------------------------------------------------- /debian/strace.install: -------------------------------------------------------------------------------- 1 | build/strace usr/bin 2 | -------------------------------------------------------------------------------- /xlat/bpf_rval.in: -------------------------------------------------------------------------------- 1 | BPF_K 2 | BPF_X 3 | BPF_A 4 | -------------------------------------------------------------------------------- /xlat/semop_flags.in: -------------------------------------------------------------------------------- 1 | SEM_UNDO 2 | IPC_NOWAIT 3 | -------------------------------------------------------------------------------- /xlat/uffd_flags.in: -------------------------------------------------------------------------------- 1 | O_NONBLOCK 2 | O_CLOEXEC 3 | -------------------------------------------------------------------------------- /debian/strace-udeb.install: -------------------------------------------------------------------------------- 1 | build/strace usr/bin 2 | -------------------------------------------------------------------------------- /debian/strace64.install: -------------------------------------------------------------------------------- 1 | build64/strace64 usr/bin 2 | -------------------------------------------------------------------------------- /linux/aarch64/signalent1.h: -------------------------------------------------------------------------------- 1 | #include "signalent.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/errnoent1.h: -------------------------------------------------------------------------------- 1 | #include "errnoent.h" 2 | -------------------------------------------------------------------------------- /linux/s390x/get_scno.c: -------------------------------------------------------------------------------- 1 | #include "s390/get_scno.c" 2 | -------------------------------------------------------------------------------- /linux/sh/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/sparc/userent.h: -------------------------------------------------------------------------------- 1 | #include "../userent0.h" 2 | -------------------------------------------------------------------------------- /linux/sparc64/errnoent1.h: -------------------------------------------------------------------------------- 1 | #include "errnoent.h" 2 | -------------------------------------------------------------------------------- /linux/sparc64/signalent1.h: -------------------------------------------------------------------------------- 1 | #include "signalent.h" 2 | -------------------------------------------------------------------------------- /linux/x32/get_scno.c: -------------------------------------------------------------------------------- 1 | #include "x86_64/get_scno.c" 2 | -------------------------------------------------------------------------------- /xlat/aclipc.in: -------------------------------------------------------------------------------- 1 | IPC_SHM 2 | IPC_SEM 3 | IPC_MSG 4 | -------------------------------------------------------------------------------- /xlat/bootflags1.in: -------------------------------------------------------------------------------- 1 | LINUX_REBOOT_MAGIC1 0xfee1dead 2 | -------------------------------------------------------------------------------- /xlat/evdev_autorepeat.in: -------------------------------------------------------------------------------- 1 | REP_DELAY 2 | REP_PERIOD 3 | -------------------------------------------------------------------------------- /xlat/sched_flags.in: -------------------------------------------------------------------------------- 1 | SCHED_FLAG_RESET_ON_FORK 1 2 | -------------------------------------------------------------------------------- /xlat/v4l2_capture_modes.in: -------------------------------------------------------------------------------- 1 | V4L2_MODE_HIGHQUALITY 2 | -------------------------------------------------------------------------------- /linux/aarch64/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/alpha/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/arc/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/arm/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern long *const arm_sp_ptr; 2 | -------------------------------------------------------------------------------- /linux/arm/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/avr32/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/bfin/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/crisv32/get_scno.c: -------------------------------------------------------------------------------- 1 | #include "crisv10/get_scno.c" 2 | -------------------------------------------------------------------------------- /linux/hppa/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/i386/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/ia64/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/m68k/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/metag/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/nios2/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/or1k/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/signalent1.h: -------------------------------------------------------------------------------- 1 | #include "signalent.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/userent.h: -------------------------------------------------------------------------------- 1 | #include "powerpc/userent.h" 2 | -------------------------------------------------------------------------------- /linux/s390/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/s390x/arch_regs.h: -------------------------------------------------------------------------------- 1 | #include "s390/arch_regs.h" 2 | -------------------------------------------------------------------------------- /linux/s390x/get_error.c: -------------------------------------------------------------------------------- 1 | #include "s390/get_error.c" 2 | -------------------------------------------------------------------------------- /linux/s390x/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/sh64/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/sparc/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/sparc64/arch_regs.h: -------------------------------------------------------------------------------- 1 | #include "sparc/arch_regs.h" 2 | -------------------------------------------------------------------------------- /linux/sparc64/errnoent.h: -------------------------------------------------------------------------------- 1 | #include "sparc/errnoent.h" 2 | -------------------------------------------------------------------------------- /linux/sparc64/ioctls_inc1.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/sparc64/signalent.h: -------------------------------------------------------------------------------- 1 | #include "sparc/signalent.h" 2 | -------------------------------------------------------------------------------- /linux/tile/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/tile/ioctls_inc1.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/x32/arch_regs.h: -------------------------------------------------------------------------------- 1 | #include "x86_64/arch_regs.h" 2 | -------------------------------------------------------------------------------- /linux/x32/get_error.c: -------------------------------------------------------------------------------- 1 | #include "x86_64/get_error.c" 2 | -------------------------------------------------------------------------------- /linux/x32/ioctls_inc1.h: -------------------------------------------------------------------------------- 1 | #include "i386/ioctls_inc0.h" 2 | -------------------------------------------------------------------------------- /linux/x32/userent.h: -------------------------------------------------------------------------------- 1 | #include "../x86_64/userent.h" 2 | -------------------------------------------------------------------------------- /linux/x86_64/ioctls_arch2.h: -------------------------------------------------------------------------------- 1 | #include "ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/x86_64/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/xtensa/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /xlat/bpf_size.in: -------------------------------------------------------------------------------- 1 | BPF_W 2 | BPF_H 3 | BPF_B 4 | BPF_DW 5 | -------------------------------------------------------------------------------- /xlat/delete_module_flags.in: -------------------------------------------------------------------------------- 1 | O_NONBLOCK 2 | O_TRUNC 3 | -------------------------------------------------------------------------------- /xlat/evdev_snd.in: -------------------------------------------------------------------------------- 1 | SND_CLICK 2 | SND_BELL 3 | SND_TONE 4 | -------------------------------------------------------------------------------- /xlat/inotify_init_flags.in: -------------------------------------------------------------------------------- 1 | O_NONBLOCK 2 | O_CLOEXEC 3 | -------------------------------------------------------------------------------- /xlat/mempolicyflags.in: -------------------------------------------------------------------------------- 1 | MPOL_F_NODE 2 | MPOL_F_ADDR 3 | -------------------------------------------------------------------------------- /xlat/mremap_flags.in: -------------------------------------------------------------------------------- 1 | MREMAP_MAYMOVE 2 | MREMAP_FIXED 3 | -------------------------------------------------------------------------------- /xlat/pr_tsc.in: -------------------------------------------------------------------------------- 1 | PR_TSC_ENABLE 1 2 | PR_TSC_SIGSEGV 2 3 | -------------------------------------------------------------------------------- /xlat/shm_flags.in: -------------------------------------------------------------------------------- 1 | SHM_REMAP 2 | SHM_RDONLY 3 | SHM_RND 4 | -------------------------------------------------------------------------------- /xlat/sock_type_flags.in: -------------------------------------------------------------------------------- 1 | SOCK_CLOEXEC 2 | SOCK_NONBLOCK 3 | -------------------------------------------------------------------------------- /xlat/xattrflags.in: -------------------------------------------------------------------------------- 1 | XATTR_CREATE 1 2 | XATTR_REPLACE 2 3 | -------------------------------------------------------------------------------- /linux/aarch64/ioctls_arch1.h: -------------------------------------------------------------------------------- 1 | #include "arm/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/aarch64/ioctls_inc1.h: -------------------------------------------------------------------------------- 1 | #include "arm/ioctls_inc0.h" 2 | -------------------------------------------------------------------------------- /linux/aarch64/syscallent1.h: -------------------------------------------------------------------------------- 1 | #include "../arm/syscallent.h" 2 | -------------------------------------------------------------------------------- /linux/crisv32/get_error.c: -------------------------------------------------------------------------------- 1 | #include "crisv10/get_error.c" 2 | -------------------------------------------------------------------------------- /linux/i386/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern long *const i386_esp_ptr; 2 | -------------------------------------------------------------------------------- /linux/microblaze/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "32/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern struct pt_regs ppc_regs; 2 | -------------------------------------------------------------------------------- /linux/powerpc64/arch_regs.h: -------------------------------------------------------------------------------- 1 | #include "powerpc/arch_regs.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/errnoent.h: -------------------------------------------------------------------------------- 1 | #include "powerpc/errnoent.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/get_error.c: -------------------------------------------------------------------------------- 1 | #include "powerpc/get_error.c" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "64/ioctls_inc.h" 2 | -------------------------------------------------------------------------------- /linux/s390x/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | #include "s390/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/sparc64/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #include "sparc/ioctls_inc0.h" 2 | -------------------------------------------------------------------------------- /linux/tile/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern struct pt_regs tile_regs; 2 | -------------------------------------------------------------------------------- /linux/x32/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | #include "x86_64/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/x32/ioctls_arch1.h: -------------------------------------------------------------------------------- 1 | #include "i386/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/x86_64/ioctls_arch1.h: -------------------------------------------------------------------------------- 1 | #include "i386/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/x86_64/ioctls_inc1.h: -------------------------------------------------------------------------------- 1 | #include "i386/ioctls_inc0.h" 2 | -------------------------------------------------------------------------------- /linux/x86_64/ioctls_inc2.h: -------------------------------------------------------------------------------- 1 | #include "x32/ioctls_inc0.h" 2 | -------------------------------------------------------------------------------- /uid16.c: -------------------------------------------------------------------------------- 1 | #define STRACE_UID_SIZE 16 2 | #include "uid.c" 3 | -------------------------------------------------------------------------------- /xlat/getrandom_flags.in: -------------------------------------------------------------------------------- 1 | GRND_NONBLOCK 1 2 | GRND_RANDOM 2 3 | -------------------------------------------------------------------------------- /xlat/ioctl_dirs.in: -------------------------------------------------------------------------------- 1 | _IOC_READ 2 | _IOC_WRITE 3 | _IOC_NONE 4 | -------------------------------------------------------------------------------- /xlat/mctl_sync.in: -------------------------------------------------------------------------------- 1 | MS_SYNC 2 | MS_ASYNC 3 | MS_INVALIDATE 4 | -------------------------------------------------------------------------------- /xlat/move_pages_flags.in: -------------------------------------------------------------------------------- 1 | MPOL_MF_MOVE 2 | MPOL_MF_MOVE_ALL 3 | -------------------------------------------------------------------------------- /xlat/priorities.in: -------------------------------------------------------------------------------- 1 | PRIO_PROCESS 2 | PRIO_PGRP 3 | PRIO_USER 4 | -------------------------------------------------------------------------------- /xlat/quotatypes.in: -------------------------------------------------------------------------------- 1 | USRQUOTA 0 2 | GRPQUOTA 1 3 | PRJQUOTA 2 4 | -------------------------------------------------------------------------------- /xlat/seccomp_filter_flags.in: -------------------------------------------------------------------------------- 1 | SECCOMP_FILTER_FLAG_TSYNC 1 2 | -------------------------------------------------------------------------------- /xlat/sigaltstack_flags.in: -------------------------------------------------------------------------------- 1 | SS_ONSTACK 1 2 | SS_DISABLE 2 3 | -------------------------------------------------------------------------------- /xlat/tcflsh_options.in: -------------------------------------------------------------------------------- 1 | TCIFLUSH 2 | TCOFLUSH 3 | TCIOFLUSH 4 | -------------------------------------------------------------------------------- /xlat/v4l2_streaming_capabilities.in: -------------------------------------------------------------------------------- 1 | V4L2_CAP_TIMEPERFRAME 2 | -------------------------------------------------------------------------------- /linux/aarch64/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | #include "arm/arch_sigreturn.c" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/getregs_old.c: -------------------------------------------------------------------------------- 1 | #include "powerpc/getregs_old.c" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | #include "powerpc/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/ioctls_arch1.h: -------------------------------------------------------------------------------- 1 | #include "powerpc/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/ioctls_inc1.h: -------------------------------------------------------------------------------- 1 | #include "powerpc/ioctls_inc0.h" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/syscallent1.h: -------------------------------------------------------------------------------- 1 | #include "powerpc/syscallent.h" 2 | -------------------------------------------------------------------------------- /linux/s390x/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | #include "s390/arch_sigreturn.c" 2 | -------------------------------------------------------------------------------- /linux/sparc64/arch_getrval2.c: -------------------------------------------------------------------------------- 1 | #include "sparc/arch_getrval2.c" 2 | -------------------------------------------------------------------------------- /linux/sparc64/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | #include "sparc/arch_sigreturn.c" 2 | -------------------------------------------------------------------------------- /linux/sparc64/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | #include "sparc/ioctls_arch0.h" 2 | -------------------------------------------------------------------------------- /linux/userent0.h: -------------------------------------------------------------------------------- 1 | { sizeof(struct user), "sizeof(struct user)" }, 2 | -------------------------------------------------------------------------------- /linux/x32/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | #include "x86_64/arch_sigreturn.c" 2 | -------------------------------------------------------------------------------- /qemu_multiarch_testing/.gitignore: -------------------------------------------------------------------------------- 1 | hdc.dir/strace 2 | hdc.img 3 | -------------------------------------------------------------------------------- /xlat/evdev_ff_status.in: -------------------------------------------------------------------------------- 1 | FF_STATUS_STOPPED 2 | FF_STATUS_PLAYING 3 | -------------------------------------------------------------------------------- /xlat/ipc_msg_flags.in: -------------------------------------------------------------------------------- 1 | MSG_NOERROR 2 | MSG_EXCEPT 3 | IPC_NOWAIT 4 | -------------------------------------------------------------------------------- /xlat/memfd_create_flags.in: -------------------------------------------------------------------------------- 1 | MFD_CLOEXEC 1 2 | MFD_ALLOW_SEALING 2 3 | -------------------------------------------------------------------------------- /xlat/pr_mce_kill.in: -------------------------------------------------------------------------------- 1 | PR_MCE_KILL_CLEAR 0 2 | PR_MCE_KILL_SET 1 3 | -------------------------------------------------------------------------------- /xlat/resource_flags.in: -------------------------------------------------------------------------------- 1 | IPC_CREAT 2 | IPC_EXCL 3 | IPC_NOWAIT 4 | -------------------------------------------------------------------------------- /xlat/tcxonc_options.in: -------------------------------------------------------------------------------- 1 | TCOOFF 2 | TCOON 3 | TCIOFF 4 | TCION 5 | -------------------------------------------------------------------------------- /xlat/usagewho.in: -------------------------------------------------------------------------------- 1 | RUSAGE_SELF 2 | RUSAGE_CHILDREN 3 | RUSAGE_BOTH 4 | -------------------------------------------------------------------------------- /xlat/v4l2_memories.in: -------------------------------------------------------------------------------- 1 | V4L2_MEMORY_MMAP 2 | V4L2_MEMORY_USERPTR 3 | -------------------------------------------------------------------------------- /linux/asm_stat.h: -------------------------------------------------------------------------------- 1 | #include "kernel_types.h" 2 | #include 3 | -------------------------------------------------------------------------------- /linux/crisv32/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | #include "crisv10/arch_sigreturn.c" 2 | -------------------------------------------------------------------------------- /linux/powerpc64/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | #include "powerpc/arch_sigreturn.c" 2 | -------------------------------------------------------------------------------- /linux/s390/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern unsigned long *const s390_frame_ptr; 2 | -------------------------------------------------------------------------------- /linux/s390x/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | #include "s390/get_syscall_args.c" 2 | -------------------------------------------------------------------------------- /linux/sparc64/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | #include "sparc/get_syscall_args.c" 2 | -------------------------------------------------------------------------------- /linux/x32/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | #include "x86_64/get_syscall_args.c" 2 | -------------------------------------------------------------------------------- /printsiginfo.h: -------------------------------------------------------------------------------- 1 | extern void printsiginfo(const siginfo_t *, bool); 2 | -------------------------------------------------------------------------------- /tests/count-f.expected: -------------------------------------------------------------------------------- 1 | [ ]*[^ ]+ +[^ ]+ +[^ ]+ +2080 +1024 +chdir 2 | -------------------------------------------------------------------------------- /xlat/itimer_which.in: -------------------------------------------------------------------------------- 1 | ITIMER_REAL 2 | ITIMER_VIRTUAL 3 | ITIMER_PROF 4 | -------------------------------------------------------------------------------- /xlat/pr_unalign_flags.in: -------------------------------------------------------------------------------- 1 | PR_UNALIGN_NOPRINT 1 2 | PR_UNALIGN_SIGBUS 2 3 | -------------------------------------------------------------------------------- /xlat/scmvals.in: -------------------------------------------------------------------------------- 1 | SCM_RIGHTS 1 2 | SCM_CREDENTIALS 2 3 | SCM_SECURITY 3 4 | -------------------------------------------------------------------------------- /xlat/shm_resource_flags.in: -------------------------------------------------------------------------------- 1 | IPC_CREAT 2 | IPC_EXCL 3 | SHM_HUGETLB 4 | -------------------------------------------------------------------------------- /xlat/ubi_volume_props.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | UBI_VOL_PROP_DIRECT_WRITE 3 | -------------------------------------------------------------------------------- /linux/aarch64/errnoent1.h: -------------------------------------------------------------------------------- 1 | /* ARM personality */ 2 | #include "errnoent.h" 3 | -------------------------------------------------------------------------------- /linux/crisv32/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | #include "crisv10/get_syscall_args.c" 2 | -------------------------------------------------------------------------------- /linux/crisv32/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | #include "crisv10/get_syscall_result.c" 2 | -------------------------------------------------------------------------------- /linux/powerpc/errnoent.h: -------------------------------------------------------------------------------- 1 | #include "../errnoent.h" 2 | [ 58] = "EDEADLOCK", 3 | -------------------------------------------------------------------------------- /linux/powerpc64/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | #include "powerpc/get_syscall_args.c" 2 | -------------------------------------------------------------------------------- /linux/tile/errnoent1.h: -------------------------------------------------------------------------------- 1 | /* tilegx32/tilepro */ 2 | #include "errnoent.h" 3 | -------------------------------------------------------------------------------- /linux/tile/signalent1.h: -------------------------------------------------------------------------------- 1 | /* tilegx32/tilepro */ 2 | #include "signalent.h" 3 | -------------------------------------------------------------------------------- /linux/x32/errnoent1.h: -------------------------------------------------------------------------------- 1 | /* i386 personality */ 2 | #include "errnoent.h" 3 | -------------------------------------------------------------------------------- /linux/x32/signalent1.h: -------------------------------------------------------------------------------- 1 | /* i386 personality */ 2 | #include "signalent.h" 3 | -------------------------------------------------------------------------------- /linux/x86_64/errnoent1.h: -------------------------------------------------------------------------------- 1 | /* i386 personality */ 2 | #include "errnoent.h" 3 | -------------------------------------------------------------------------------- /linux/x86_64/errnoent2.h: -------------------------------------------------------------------------------- 1 | /* x32 personality */ 2 | #include "errnoent.h" 3 | -------------------------------------------------------------------------------- /linux/x86_64/signalent2.h: -------------------------------------------------------------------------------- 1 | /* x32 personality */ 2 | #include "signalent.h" 3 | -------------------------------------------------------------------------------- /xlat/cpuclocknames.in: -------------------------------------------------------------------------------- 1 | CPUCLOCK_PROF 2 | CPUCLOCK_VIRT 3 | CPUCLOCK_SCHED 4 | -------------------------------------------------------------------------------- /xlat/epollctls.in: -------------------------------------------------------------------------------- 1 | EPOLL_CTL_ADD 1 2 | EPOLL_CTL_DEL 2 3 | EPOLL_CTL_MOD 3 4 | -------------------------------------------------------------------------------- /xlat/f_owner_types.in: -------------------------------------------------------------------------------- 1 | F_OWNER_TID 0 2 | F_OWNER_PID 1 3 | F_OWNER_PGRP 2 4 | -------------------------------------------------------------------------------- /xlat/lockfcmds.in: -------------------------------------------------------------------------------- 1 | F_RDLCK 2 | F_WRLCK 3 | F_UNLCK 4 | F_EXLCK 5 | F_SHLCK 6 | -------------------------------------------------------------------------------- /xlat/mbindflags.in: -------------------------------------------------------------------------------- 1 | MPOL_MF_STRICT 2 | MPOL_MF_MOVE 3 | MPOL_MF_MOVE_ALL 4 | -------------------------------------------------------------------------------- /xlat/membarrier_cmds.in: -------------------------------------------------------------------------------- 1 | MEMBARRIER_CMD_QUERY 0 2 | MEMBARRIER_CMD_SHARED 1 3 | -------------------------------------------------------------------------------- /xlat/mlockall_flags.in: -------------------------------------------------------------------------------- 1 | MCL_CURRENT 1 2 | MCL_FUTURE 2 3 | MCL_ONFAULT 4 4 | -------------------------------------------------------------------------------- /xlat/mtd_otp_options.in: -------------------------------------------------------------------------------- 1 | MTD_OTP_OFF 2 | MTD_OTP_FACTORY 3 | MTD_OTP_USER 4 | -------------------------------------------------------------------------------- /xlat/open_access_modes.in: -------------------------------------------------------------------------------- 1 | O_RDONLY 2 | O_WRONLY 3 | O_RDWR 4 | O_ACCMODE 5 | -------------------------------------------------------------------------------- /xlat/v4l2_input_types.in: -------------------------------------------------------------------------------- 1 | V4L2_INPUT_TYPE_TUNER 2 | V4L2_INPUT_TYPE_CAMERA 3 | -------------------------------------------------------------------------------- /linux/bfin/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long bfin_r0; 2 | #define ARCH_PC_PEEK_ADDR PT_PC 3 | -------------------------------------------------------------------------------- /linux/x86_64/signalent1.h: -------------------------------------------------------------------------------- 1 | /* i386 personality */ 2 | #include "signalent.h" 3 | -------------------------------------------------------------------------------- /xlat/access_flags.in: -------------------------------------------------------------------------------- 1 | F_OK 2 | R_OK 3 | W_OK 4 | X_OK 5 | EFF_ONLY_OK 6 | EX_OK 7 | -------------------------------------------------------------------------------- /xlat/archvals.in: -------------------------------------------------------------------------------- 1 | ARCH_SET_GS 2 | ARCH_SET_FS 3 | ARCH_GET_FS 4 | ARCH_GET_GS 5 | -------------------------------------------------------------------------------- /xlat/bpf_map_update_elem_flags.in: -------------------------------------------------------------------------------- 1 | BPF_ANY 0 2 | BPF_NOEXIST 1 3 | BPF_EXIST 2 4 | -------------------------------------------------------------------------------- /xlat/evdev_sync.in: -------------------------------------------------------------------------------- 1 | SYN_REPORT 2 | SYN_CONFIG 3 | SYN_MT_REPORT 4 | SYN_DROPPED 5 | -------------------------------------------------------------------------------- /xlat/if_dqinfo_flags.in: -------------------------------------------------------------------------------- 1 | DQF_ROOT_SQUASH (1 << 0) 2 | DQF_SYS_FILE (1 << 16) 3 | -------------------------------------------------------------------------------- /xlat/rename_flags.in: -------------------------------------------------------------------------------- 1 | RENAME_NOREPLACE 2 | RENAME_EXCHANGE 3 | RENAME_WHITEOUT 4 | -------------------------------------------------------------------------------- /xlat/seccomp_ops.in: -------------------------------------------------------------------------------- 1 | SECCOMP_SET_MODE_STRICT 0 2 | SECCOMP_SET_MODE_FILTER 1 3 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | See the file CREDITS. Automake likes us to have this file called AUTHORS. 2 | -------------------------------------------------------------------------------- /linux/hppa/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long hppa_r28; 2 | #define ARCH_PC_PEEK_ADDR PT_IAOQ0 3 | -------------------------------------------------------------------------------- /linux/sh/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long sh_r0; 2 | #define ARCH_PC_PEEK_ADDR (4 * REG_PC) 3 | -------------------------------------------------------------------------------- /linux/sh64/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long sh64_r9; 2 | #define ARCH_PC_PEEK_ADDR REG_PC 3 | -------------------------------------------------------------------------------- /linux/x86_64/syscallent2.h: -------------------------------------------------------------------------------- 1 | /* x32 personality */ 2 | #include "../x32/syscallent.h" 3 | -------------------------------------------------------------------------------- /linux/xtensa/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long xtensa_a2; 2 | #define ARCH_PC_PEEK_ADDR REG_PC 3 | -------------------------------------------------------------------------------- /tests/ksysent.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Validate syscallent.h 4 | 5 | ./ksysent 6 | -------------------------------------------------------------------------------- /tests/strace-T.expected: -------------------------------------------------------------------------------- 1 | nanosleep\(\{1, 0\}, NULL\) = 0 <(1\.0|0\.9)[[:digit:]]{5}> 2 | -------------------------------------------------------------------------------- /xlat/cacheflush_scope.in: -------------------------------------------------------------------------------- 1 | FLUSH_SCOPE_LINE 2 | FLUSH_SCOPE_PAGE 3 | FLUSH_SCOPE_ALL 4 | -------------------------------------------------------------------------------- /xlat/policies.in: -------------------------------------------------------------------------------- 1 | MPOL_DEFAULT 2 | MPOL_PREFERRED 3 | MPOL_BIND 4 | MPOL_INTERLEAVE 5 | -------------------------------------------------------------------------------- /xlat/sigprocmaskcmds.in: -------------------------------------------------------------------------------- 1 | SIG_BLOCK 2 | SIG_UNBLOCK 3 | SIG_SETMASK 4 | SIG_SETMASK32 5 | -------------------------------------------------------------------------------- /xlat/ubi_volume_types.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | UBI_DYNAMIC_VOLUME 3 | UBI_STATIC_VOLUME 4 | -------------------------------------------------------------------------------- /xlat/whence_codes.in: -------------------------------------------------------------------------------- 1 | SEEK_SET 2 | SEEK_CUR 3 | SEEK_END 4 | SEEK_DATA 5 | SEEK_HOLE 6 | -------------------------------------------------------------------------------- /linux/m68k/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long m68k_d0; 2 | #define ARCH_PC_PEEK_ADDR (4 * PT_PC) 3 | -------------------------------------------------------------------------------- /xlat/f_seals.in: -------------------------------------------------------------------------------- 1 | F_SEAL_SEAL 1 2 | F_SEAL_SHRINK 2 3 | F_SEAL_GROW 4 4 | F_SEAL_WRITE 8 5 | -------------------------------------------------------------------------------- /xlat/kexec_load_flags.in: -------------------------------------------------------------------------------- 1 | KEXEC_ON_CRASH 0x00000001 2 | KEXEC_PRESERVE_CONTEXT 0x00000002 3 | -------------------------------------------------------------------------------- /xlat/module_init_flags.in: -------------------------------------------------------------------------------- 1 | MODULE_INIT_IGNORE_MODVERSIONS 2 | MODULE_INIT_IGNORE_VERMAGIC 3 | -------------------------------------------------------------------------------- /xlat/ptp_flags_options.in: -------------------------------------------------------------------------------- 1 | PTP_ENABLE_FEATURE 2 | PTP_RISING_EDGE 3 | PTP_FALLING_EDGE 4 | -------------------------------------------------------------------------------- /xlat/quota_formats.in: -------------------------------------------------------------------------------- 1 | QFMT_VFS_OLD 1 2 | QFMT_VFS_V0 2 3 | QFMT_OCFS2 3 4 | QFMT_VFS_V1 4 5 | -------------------------------------------------------------------------------- /xlat/shutdown_modes.in: -------------------------------------------------------------------------------- 1 | { 0, "SHUT_RD" }, 2 | { 1, "SHUT_WR" }, 3 | { 2, "SHUT_RDWR" }, 4 | -------------------------------------------------------------------------------- /xlat/sigsegv_codes.in: -------------------------------------------------------------------------------- 1 | SEGV_MAPERR 1 2 | SEGV_ACCERR 2 3 | SEGV_BNDERR 3 4 | SEGV_PKUERR 4 5 | -------------------------------------------------------------------------------- /xlat/sigtrap_codes.in: -------------------------------------------------------------------------------- 1 | TRAP_BRKPT 1 2 | TRAP_TRACE 2 3 | TRAP_BRANCH 3 4 | TRAP_HWBKPT 4 5 | -------------------------------------------------------------------------------- /xlat/umount_flags.in: -------------------------------------------------------------------------------- 1 | MNT_FORCE 1 2 | MNT_DETACH 2 3 | MNT_EXPIRE 4 4 | UMOUNT_NOFOLLOW 8 5 | -------------------------------------------------------------------------------- /xlat/v4l2_format_description_flags.in: -------------------------------------------------------------------------------- 1 | V4L2_FMT_FLAG_COMPRESSED 2 | V4L2_FMT_FLAG_EMULATED 3 | -------------------------------------------------------------------------------- /linux/crisv10/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long cris_r10; 2 | #define ARCH_PC_PEEK_ADDR (4 * PT_IRP) 3 | -------------------------------------------------------------------------------- /linux/microblaze/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long microblaze_r3; 2 | #define ARCH_PC_PEEK_ADDR PT_PC 3 | -------------------------------------------------------------------------------- /linux/sparc64/arch_regs.c: -------------------------------------------------------------------------------- 1 | #include "sparc/arch_regs.c" 2 | #define ARCH_PC_REG sparc_regs.tpc 3 | -------------------------------------------------------------------------------- /tests/stack-fcall-0.c: -------------------------------------------------------------------------------- 1 | int f1(int i); 2 | 3 | int f0(int i) 4 | { 5 | return f1(i) - i; 6 | } 7 | -------------------------------------------------------------------------------- /tests/stack-fcall-1.c: -------------------------------------------------------------------------------- 1 | int f2(int i); 2 | 3 | int f1(int i) 4 | { 5 | return f2(i) + i; 6 | } 7 | -------------------------------------------------------------------------------- /tests/stack-fcall-2.c: -------------------------------------------------------------------------------- 1 | int f3(int i); 2 | 3 | int f2(int i) 4 | { 5 | return f3(i) - i; 6 | } 7 | -------------------------------------------------------------------------------- /xlat/blkpg_ops.in: -------------------------------------------------------------------------------- 1 | BLKPG_ADD_PARTITION 1 2 | BLKPG_DEL_PARTITION 2 3 | BLKPG_RESIZE_PARTITION 3 4 | -------------------------------------------------------------------------------- /xlat/if_dqinfo_valid.in: -------------------------------------------------------------------------------- 1 | IIF_BGRACE (1 << 0) 2 | IIF_IGRACE (1 << 1) 3 | IIF_FLAGS (1 << 2) 4 | -------------------------------------------------------------------------------- /xlat/loop_flags_options.in: -------------------------------------------------------------------------------- 1 | LO_FLAGS_READ_ONLY 2 | LO_FLAGS_AUTOCLEAR 3 | LO_FLAGS_PARTSCAN 4 | -------------------------------------------------------------------------------- /xlat/sigev_value.in: -------------------------------------------------------------------------------- 1 | SIGEV_SIGNAL 0 2 | SIGEV_NONE 1 3 | SIGEV_THREAD 2 4 | SIGEV_THREAD_ID 4 5 | -------------------------------------------------------------------------------- /xlat/splice_flags.in: -------------------------------------------------------------------------------- 1 | SPLICE_F_MOVE 2 | SPLICE_F_NONBLOCK 3 | SPLICE_F_MORE 4 | SPLICE_F_GIFT 5 | -------------------------------------------------------------------------------- /linux/crisv32/arch_regs.c: -------------------------------------------------------------------------------- 1 | #include "crisv10/arch_regs.c" 2 | #define ARCH_PC_PEEK_ADDR (4 * PT_ERP) 3 | -------------------------------------------------------------------------------- /linux/mips/.gitignore: -------------------------------------------------------------------------------- 1 | syscallent-n32-stub.h 2 | syscallent-n64-stub.h 3 | syscallent-o32-stub.h 4 | -------------------------------------------------------------------------------- /linux/powerpc64/arch_regs.c: -------------------------------------------------------------------------------- 1 | #include "powerpc/arch_regs.c" 2 | #define ARCH_PC_REG ppc_regs.nip 3 | -------------------------------------------------------------------------------- /linux/s390x/arch_regs.c: -------------------------------------------------------------------------------- 1 | #include "s390/arch_regs.c" 2 | #define ARCH_PC_REG s390_regset.psw.addr 3 | -------------------------------------------------------------------------------- /seccomp_fprog.h: -------------------------------------------------------------------------------- 1 | struct seccomp_fprog { 2 | unsigned short len; 3 | unsigned long filter; 4 | }; 5 | -------------------------------------------------------------------------------- /tests/memfd_create.expected: -------------------------------------------------------------------------------- 1 | memfd_create\("strace", MFD_CLOEXEC\|MFD_ALLOW_SEALING\|0x4\) += -1 .* 2 | -------------------------------------------------------------------------------- /tests/oldselect.expected: -------------------------------------------------------------------------------- 1 | select(2, [1], [0], NULL, {0, 42}) = 0 (Timeout) 2 | +++ exited with 0 +++ 3 | -------------------------------------------------------------------------------- /tests/pipe.expected: -------------------------------------------------------------------------------- 1 | pipe(\(\[0, 1\]|2\(\[0, 1\], 0)\) += 0 2 | pipe2\(\[0, 1\], O_NONBLOCK\) += 0 3 | -------------------------------------------------------------------------------- /tests/stat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check stat syscall decoding. 4 | 5 | . "${srcdir=.}/statx.sh" 6 | -------------------------------------------------------------------------------- /xlat/adjtimex_state.in: -------------------------------------------------------------------------------- 1 | TIME_OK 2 | TIME_INS 3 | TIME_DEL 4 | TIME_OOP 5 | TIME_WAIT 6 | TIME_ERROR 7 | -------------------------------------------------------------------------------- /xlat/bpf_mode.in: -------------------------------------------------------------------------------- 1 | BPF_IMM 2 | BPF_ABS 3 | BPF_IND 4 | BPF_MEM 5 | BPF_LEN 6 | BPF_MSH 7 | BPF_XADD 8 | -------------------------------------------------------------------------------- /xlat/fcntl64cmds.in: -------------------------------------------------------------------------------- 1 | /* asm-generic/fcntl.h */ 2 | F_GETLK64 12 3 | F_SETLK64 13 4 | F_SETLKW64 14 5 | -------------------------------------------------------------------------------- /xlat/ioprio_who.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | IOPRIO_WHO_PROCESS 3 | IOPRIO_WHO_PGRP 4 | IOPRIO_WHO_USER 5 | -------------------------------------------------------------------------------- /xlat/modetypes.in: -------------------------------------------------------------------------------- 1 | S_IFREG 2 | S_IFSOCK 3 | S_IFIFO 4 | S_IFLNK 5 | S_IFDIR 6 | S_IFBLK 7 | S_IFCHR 8 | -------------------------------------------------------------------------------- /xlat/msgctl_flags.in: -------------------------------------------------------------------------------- 1 | IPC_RMID 2 | IPC_SET 3 | IPC_STAT 4 | IPC_INFO 5 | MSG_STAT 11 6 | MSG_INFO 12 7 | -------------------------------------------------------------------------------- /xlat/mtd_flags_options.in: -------------------------------------------------------------------------------- 1 | MTD_WRITEABLE 2 | MTD_BIT_WRITEABLE 3 | MTD_NO_ERASE 4 | MTD_POWERUP_LOCK 5 | -------------------------------------------------------------------------------- /xlat/mtd_mode_options.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | MTD_OPS_PLACE_OOB 3 | MTD_OPS_AUTO_OOB 4 | MTD_OPS_RAW 5 | -------------------------------------------------------------------------------- /xlat/pr_mce_kill_policy.in: -------------------------------------------------------------------------------- 1 | PR_MCE_KILL_LATE 0 2 | PR_MCE_KILL_EARLY 1 3 | PR_MCE_KILL_DEFAULT 2 4 | -------------------------------------------------------------------------------- /xlat/seccomp_mode.in: -------------------------------------------------------------------------------- 1 | SECCOMP_MODE_DISABLED 0 2 | SECCOMP_MODE_STRICT 1 3 | SECCOMP_MODE_FILTER 2 4 | -------------------------------------------------------------------------------- /xlat/xfs_dqblk_flags.in: -------------------------------------------------------------------------------- 1 | XFS_USER_QUOTA (1<<0) 2 | XFS_PROJ_QUOTA (1<<1) 3 | XFS_GROUP_QUOTA (1<<2) 4 | -------------------------------------------------------------------------------- /linux/aarch64/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern uint64_t *const aarch64_sp_ptr; 2 | extern uint32_t *const arm_sp_ptr; 3 | -------------------------------------------------------------------------------- /linux/ia64/arch_getrval2.c: -------------------------------------------------------------------------------- 1 | long 2 | getrval2(struct tcb *tcp) 3 | { 4 | return ia64_regs.gr[9]; 5 | } 6 | -------------------------------------------------------------------------------- /linux/ia64/arch_regs.h: -------------------------------------------------------------------------------- 1 | #include 2 | extern unsigned long *const ia64_frame_ptr; 3 | -------------------------------------------------------------------------------- /linux/x86_64/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern uint32_t *const i386_esp_ptr; 2 | extern uint64_t *const x86_64_rsp_ptr; 3 | -------------------------------------------------------------------------------- /tests/lstat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check lstat syscall decoding. 4 | 5 | . "${srcdir=.}/statx.sh" 6 | -------------------------------------------------------------------------------- /tests/stack-fcall-3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int f3(int i) 4 | { 5 | return getpid() + i; 6 | } 7 | -------------------------------------------------------------------------------- /tests/stat64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check stat64 syscall decoding. 4 | 5 | . "${srcdir=.}/statx.sh" 6 | -------------------------------------------------------------------------------- /xlat/epollflags.in: -------------------------------------------------------------------------------- 1 | #if defined EPOLL_CLOEXEC || defined O_CLOEXEC 2 | EPOLL_CLOEXEC O_CLOEXEC 3 | #endif 4 | -------------------------------------------------------------------------------- /xlat/sram_alloc_flags.in: -------------------------------------------------------------------------------- 1 | L1_INST_SRAM 2 | L1_DATA_A_SRAM 3 | L1_DATA_B_SRAM 4 | L1_DATA_SRAM 5 | L2_SRAM 6 | -------------------------------------------------------------------------------- /xlat/sysctl_net_unix.in: -------------------------------------------------------------------------------- 1 | NET_UNIX_DESTROY_DELAY 2 | NET_UNIX_DELETE_DELAY 3 | NET_UNIX_MAX_DGRAM_QLEN 4 | -------------------------------------------------------------------------------- /xlat/sysmips_operations.in: -------------------------------------------------------------------------------- 1 | SETNAME 2 | FLUSH_CACHE 3 | MIPS_FIXADE 4 | MIPS_RDNVRAM 5 | MIPS_ATOMIC_SET 6 | -------------------------------------------------------------------------------- /linux/alpha/arch_regs.c: -------------------------------------------------------------------------------- 1 | static long alpha_r0; 2 | static long alpha_a3; 3 | #define ARCH_PC_PEEK_ADDR REG_PC 4 | -------------------------------------------------------------------------------- /linux/mips/arch_getrval2.c: -------------------------------------------------------------------------------- 1 | long 2 | getrval2(struct tcb *tcp) 3 | { 4 | return mips_regs.uregs[3]; 5 | } 6 | -------------------------------------------------------------------------------- /tests/fanotify_mark.expected: -------------------------------------------------------------------------------- 1 | fanotify_mark\(-1, FAN_MARK_ADD, FAN_MODIFY\|FAN_ONDIR, AT_FDCWD, "\."\) += -1.* 2 | -------------------------------------------------------------------------------- /tests/fcntl64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fcntl64 syscall decoding. 4 | 5 | . "${srcdir=.}/fcntl.test" 6 | -------------------------------------------------------------------------------- /tests/fstat64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fstat64 syscall decoding. 4 | 5 | . "${srcdir=.}/fstat.test" 6 | -------------------------------------------------------------------------------- /tests/fstatat64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fstatat64 syscall decoding. 4 | 5 | . "${srcdir=.}/statx.sh" 6 | -------------------------------------------------------------------------------- /tests/lstat64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check lstat64 syscall decoding. 4 | 5 | . "${srcdir=.}/statx.sh" 6 | -------------------------------------------------------------------------------- /tests/signalfd.expected: -------------------------------------------------------------------------------- 1 | signalfd4\(-1, \[(USR2 CHLD|CHLD USR2)\], (4|8|16), SFD_CLOEXEC\|SFD_NONBLOCK\) += 0 2 | -------------------------------------------------------------------------------- /xlat/bpf_class.in: -------------------------------------------------------------------------------- 1 | BPF_LD 2 | BPF_LDX 3 | BPF_ST 4 | BPF_STX 5 | BPF_ALU 6 | BPF_JMP 7 | BPF_RET 8 | BPF_MISC 9 | -------------------------------------------------------------------------------- /xlat/evdev_misc.in: -------------------------------------------------------------------------------- 1 | MSC_SERIAL 2 | MSC_PULSELED 3 | MSC_GESTURE 4 | MSC_RAW 5 | MSC_SCAN 6 | MSC_TIMESTAMP 7 | -------------------------------------------------------------------------------- /xlat/kexec_file_load_flags.in: -------------------------------------------------------------------------------- 1 | KEXEC_FILE_UNLOAD 1 2 | KEXEC_FILE_ON_CRASH 2 3 | KEXEC_FILE_NO_INITRAMFS 4 4 | -------------------------------------------------------------------------------- /xlat/sigbus_codes.in: -------------------------------------------------------------------------------- 1 | BUS_ADRALN 1 2 | BUS_ADRERR 2 3 | BUS_OBJERR 3 4 | BUS_MCEERR_AR 4 5 | BUS_MCEERR_AO 5 6 | -------------------------------------------------------------------------------- /xlat/sigpoll_codes.in: -------------------------------------------------------------------------------- 1 | POLL_IN 1 2 | POLL_OUT 2 3 | POLL_MSG 3 4 | POLL_ERR 4 5 | POLL_PRI 5 6 | POLL_HUP 6 7 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | opts="uversionmangle=s/-/./g" http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.xz 3 | -------------------------------------------------------------------------------- /linux/arc/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/arc/include/ tree. */ 2 | -------------------------------------------------------------------------------- /linux/x32/syscallent1.h: -------------------------------------------------------------------------------- 1 | /* Our second set comes from the i386 files. */ 2 | 3 | #include "../i386/syscallent.h" 4 | -------------------------------------------------------------------------------- /tests/_newselect.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check _newselect syscall decoding. 4 | 5 | . "${srcdir=.}/select.test" 6 | -------------------------------------------------------------------------------- /tests/eventfd.expected: -------------------------------------------------------------------------------- 1 | eventfd2(4294967295, EFD_SEMAPHORE|EFD_CLOEXEC|EFD_NONBLOCK) = 0 2 | +++ exited with 0 +++ 3 | -------------------------------------------------------------------------------- /tests/faccessat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check faccessat syscall decoding. 4 | 5 | . "${srcdir=.}/openat.test" 6 | -------------------------------------------------------------------------------- /tests/newfstatat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check newfstatat syscall decoding. 4 | 5 | . "${srcdir=.}/statx.sh" 6 | -------------------------------------------------------------------------------- /xlat/futexwakeops.in: -------------------------------------------------------------------------------- 1 | FUTEX_OP_SET 0 2 | FUTEX_OP_ADD 1 3 | FUTEX_OP_OR 2 4 | FUTEX_OP_ANDN 3 5 | FUTEX_OP_XOR 4 6 | -------------------------------------------------------------------------------- /xlat/packet_mreq_type.in: -------------------------------------------------------------------------------- 1 | PACKET_MR_MULTICAST 2 | PACKET_MR_PROMISC 3 | PACKET_MR_ALLMULTI 4 | PACKET_MR_UNICAST 5 | -------------------------------------------------------------------------------- /xlat/sg_io_dxfer_direction.in: -------------------------------------------------------------------------------- 1 | SG_DXFER_NONE 2 | SG_DXFER_TO_DEV 3 | SG_DXFER_FROM_DEV 4 | SG_DXFER_TO_FROM_DEV 5 | -------------------------------------------------------------------------------- /linux/metag/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/metag/include/ tree. */ 2 | -------------------------------------------------------------------------------- /linux/nios2/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/nios2/include/ tree. */ 2 | -------------------------------------------------------------------------------- /linux/sparc/arch_getrval2.c: -------------------------------------------------------------------------------- 1 | long 2 | getrval2(struct tcb *tcp) 3 | { 4 | return sparc_regs.u_regs[U_REG_O1]; 5 | } 6 | -------------------------------------------------------------------------------- /linux/tile/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/tile/include/ tree. */ 2 | -------------------------------------------------------------------------------- /linux/tile/ioctls_arch1.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/tile/include/ tree. */ 2 | -------------------------------------------------------------------------------- /linux/x86_64/syscallent1.h: -------------------------------------------------------------------------------- 1 | /* Our second set comes from the i386 files. */ 2 | 3 | #include "../i386/syscallent.h" 4 | -------------------------------------------------------------------------------- /tests/execve-v.c: -------------------------------------------------------------------------------- 1 | /* This file is part of execve-v strace test. */ 2 | #define VERBOSE_EXECVE 3 | #include "execve.c" 4 | -------------------------------------------------------------------------------- /tests/ipc_msg.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of ipc msgget/msgctl syscalls 4 | 5 | . "${srcdir=.}/ipc.sh" 6 | -------------------------------------------------------------------------------- /tests/ipc_sem.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of ipc semget/semctl syscalls 4 | 5 | . "${srcdir=.}/ipc.sh" 6 | -------------------------------------------------------------------------------- /tests/ipc_shm.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of ipc shmget/shmctl syscalls 4 | 5 | . "${srcdir=.}/ipc.sh" 6 | -------------------------------------------------------------------------------- /tests/readlinkat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check readlinkat syscall decoding. 4 | 5 | . "${srcdir=.}/readlink.test" 6 | -------------------------------------------------------------------------------- /tests/stack-fcall.c: -------------------------------------------------------------------------------- 1 | int f0(int i); 2 | 3 | int main(int argc, char** argv) 4 | { 5 | f0(argc); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tests/uid16.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check uid16_t decoding. 4 | 5 | uid_t_size=16 6 | 7 | . "${srcdir=.}/uid.test" 8 | -------------------------------------------------------------------------------- /tests/vfork-f.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how strace -f follows vfork syscall. 4 | 5 | . "${srcdir=.}/fork-f.test" 6 | -------------------------------------------------------------------------------- /xlat/bsg_subprotocol.in: -------------------------------------------------------------------------------- 1 | BSG_SUB_PROTOCOL_SCSI_CMD 2 | BSG_SUB_PROTOCOL_SCSI_TMF 3 | BSG_SUB_PROTOCOL_SCSI_TRANSPORT 4 | -------------------------------------------------------------------------------- /xlat/fan_classes.in: -------------------------------------------------------------------------------- 1 | FAN_CLASS_NOTIF 0x00000000 2 | FAN_CLASS_CONTENT 0x00000004 3 | FAN_CLASS_PRE_CONTENT 0x00000008 4 | -------------------------------------------------------------------------------- /xlat/ioprio_class.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | IOPRIO_CLASS_NONE 3 | IOPRIO_CLASS_RT 4 | IOPRIO_CLASS_BE 5 | IOPRIO_CLASS_IDLE 6 | -------------------------------------------------------------------------------- /xlat/notifyflags.in: -------------------------------------------------------------------------------- 1 | DN_ACCESS 2 | DN_MODIFY 3 | DN_CREATE 4 | DN_DELETE 5 | DN_RENAME 6 | DN_ATTRIB 7 | DN_MULTISHOT 8 | -------------------------------------------------------------------------------- /xlat/socktypes.in: -------------------------------------------------------------------------------- 1 | SOCK_STREAM 2 | SOCK_DGRAM 3 | SOCK_RAW 4 | SOCK_RDM 5 | SOCK_SEQPACKET 6 | SOCK_DCCP 7 | SOCK_PACKET 8 | -------------------------------------------------------------------------------- /xlat/v4l2_framesize_types.in: -------------------------------------------------------------------------------- 1 | V4L2_FRMSIZE_TYPE_DISCRETE 2 | V4L2_FRMSIZE_TYPE_CONTINUOUS 3 | V4L2_FRMSIZE_TYPE_STEPWISE 4 | -------------------------------------------------------------------------------- /caps1.h: -------------------------------------------------------------------------------- 1 | CAP_MAC_OVERRIDE, 2 | CAP_MAC_ADMIN, 3 | CAP_SYSLOG, 4 | CAP_WAKE_ALARM, 5 | CAP_BLOCK_SUSPEND, 6 | CAP_AUDIT_READ, 7 | -------------------------------------------------------------------------------- /linux/aarch64/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm64/include/ tree. */ 2 | -------------------------------------------------------------------------------- /linux/or1k/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/openrisc/include/ tree. */ 2 | -------------------------------------------------------------------------------- /tests/execveat-v.c: -------------------------------------------------------------------------------- 1 | /* This file is part of execveat-v strace test. */ 2 | #define VERBOSE_EXECVEAT 3 | #include "execveat.c" 4 | -------------------------------------------------------------------------------- /tests/fcntl.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fcntl decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a8 7 | -------------------------------------------------------------------------------- /tests/tee.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check tee syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/uid32.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check uid32 decoding. 4 | 5 | uid_syscall_suffix=32 6 | 7 | . "${srcdir=.}/uid.test" 8 | -------------------------------------------------------------------------------- /xlat/schedulers.in: -------------------------------------------------------------------------------- 1 | SCHED_OTHER 2 | SCHED_FIFO 3 | SCHED_RR 4 | SCHED_BATCH 5 | SCHED_ISO 6 | SCHED_IDLE 7 | SCHED_DEADLINE 8 | -------------------------------------------------------------------------------- /xlat/sigchld_codes.in: -------------------------------------------------------------------------------- 1 | CLD_EXITED 1 2 | CLD_KILLED 2 3 | CLD_DUMPED 3 4 | CLD_TRAPPED 4 5 | CLD_STOPPED 5 6 | CLD_CONTINUED 6 7 | -------------------------------------------------------------------------------- /xlat/sync_file_range_flags.in: -------------------------------------------------------------------------------- 1 | SYNC_FILE_RANGE_WAIT_BEFORE 1 2 | SYNC_FILE_RANGE_WRITE 2 3 | SYNC_FILE_RANGE_WAIT_AFTER 4 4 | -------------------------------------------------------------------------------- /xlat/v4l2_frameinterval_types.in: -------------------------------------------------------------------------------- 1 | V4L2_FRMIVAL_TYPE_DISCRETE 2 | V4L2_FRMIVAL_TYPE_CONTINUOUS 3 | V4L2_FRMIVAL_TYPE_STEPWISE 4 | -------------------------------------------------------------------------------- /xlat/waitid_types.in: -------------------------------------------------------------------------------- 1 | P_PID 2 | P_PPID 3 | P_PGID 4 | P_SID 5 | P_CID 6 | P_UID 7 | P_GID 8 | P_ALL 9 | P_LWPID 10 | -------------------------------------------------------------------------------- /chdir.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(chdir) 4 | { 5 | printpath(tcp, tcp->u_arg[0]); 6 | 7 | return RVAL_DECODED; 8 | } 9 | -------------------------------------------------------------------------------- /linux/alpha/arch_regs.h: -------------------------------------------------------------------------------- 1 | #define REG_R0 0 2 | #define REG_A0 16 3 | #define REG_A3 19 4 | #define REG_FP 30 5 | #define REG_PC 64 6 | -------------------------------------------------------------------------------- /linux/microblaze/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/microblaze/include/ tree. */ 2 | -------------------------------------------------------------------------------- /linux/sparc64/syscallent1.h: -------------------------------------------------------------------------------- 1 | #define sys_mmap_4koff sys_mmap_pgoff 2 | #include "../sparc/syscallent.h" 3 | #undef sys_mmap_4koff 4 | -------------------------------------------------------------------------------- /regs.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef HAVE_SYS_REG_H 4 | # include 5 | #endif 6 | 7 | #include "arch_regs.h" 8 | -------------------------------------------------------------------------------- /tests/acct.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check acct syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a21 7 | -------------------------------------------------------------------------------- /tests/dup.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check dup syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a8 7 | -------------------------------------------------------------------------------- /tests/dup2.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check dup2 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a13 7 | -------------------------------------------------------------------------------- /tests/dup3.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check dup3 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a24 7 | -------------------------------------------------------------------------------- /tests/linkat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check linkat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/mlock2.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check mlock2 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/splice.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check splice syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/time.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check time syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a10 7 | -------------------------------------------------------------------------------- /xlat/sfd_flags.in: -------------------------------------------------------------------------------- 1 | #if defined SFD_CLOEXEC || defined O_CLOEXEC 2 | SFD_CLOEXEC O_CLOEXEC 3 | #endif 4 | SFD_NONBLOCK O_NONBLOCK 5 | -------------------------------------------------------------------------------- /xlat/shmctl_flags.in: -------------------------------------------------------------------------------- 1 | IPC_RMID 2 | IPC_SET 3 | IPC_STAT 4 | IPC_INFO 5 | SHM_STAT 13 6 | SHM_INFO 14 7 | SHM_LOCK 8 | SHM_UNLOCK 9 | -------------------------------------------------------------------------------- /iopl.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(iopl) 4 | { 5 | tprintf("%d", (int) tcp->u_arg[0]); 6 | 7 | return RVAL_DECODED; 8 | } 9 | -------------------------------------------------------------------------------- /linux/mips/ioctls_inc0.h: -------------------------------------------------------------------------------- 1 | #ifdef LINUX_MIPSN64 2 | # include "64/ioctls_inc.h" 3 | #else 4 | # include "32/ioctls_inc.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/alarm.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check alarm syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a10 7 | -------------------------------------------------------------------------------- /tests/chmod.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check chmod syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a28 7 | -------------------------------------------------------------------------------- /tests/chroot.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check chroot syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a24 7 | -------------------------------------------------------------------------------- /tests/creat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check creat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a21 7 | -------------------------------------------------------------------------------- /tests/execveat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check execveat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/fchmod.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fchmod syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a16 7 | -------------------------------------------------------------------------------- /tests/flock.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check flock syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a19 7 | -------------------------------------------------------------------------------- /tests/fsync.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fsync syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a10 7 | -------------------------------------------------------------------------------- /tests/getcwd.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getcwd syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a18 7 | -------------------------------------------------------------------------------- /tests/mknod.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check mknod syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a29 7 | -------------------------------------------------------------------------------- /tests/preadv.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check preadv syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a21 7 | -------------------------------------------------------------------------------- /tests/pselect6.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check pselect6 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/rename.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check rename syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a35 7 | -------------------------------------------------------------------------------- /tests/renameat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check renameat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/select.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check select syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a36 7 | -------------------------------------------------------------------------------- /tests/syslog.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check syslog syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a36 7 | -------------------------------------------------------------------------------- /tests/truncate.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check truncate syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/umask.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check umask syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a11 7 | -------------------------------------------------------------------------------- /xlat/cap_version.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | _LINUX_CAPABILITY_VERSION_1 3 | _LINUX_CAPABILITY_VERSION_2 4 | _LINUX_CAPABILITY_VERSION_3 5 | -------------------------------------------------------------------------------- /xlat/dirent_types.in: -------------------------------------------------------------------------------- 1 | DT_UNKNOWN 2 | DT_FIFO 3 | DT_CHR 4 | DT_DIR 5 | DT_BLK 6 | DT_REG 7 | DT_LNK 8 | DT_SOCK 9 | DT_WHT 10 | -------------------------------------------------------------------------------- /xlat/kcmp_types.in: -------------------------------------------------------------------------------- 1 | KCMP_FILE 0 2 | KCMP_VM 1 3 | KCMP_FILES 2 4 | KCMP_FS 3 5 | KCMP_SIGHAND 4 6 | KCMP_IO 5 7 | KCMP_SYSVSEM 6 8 | -------------------------------------------------------------------------------- /xlat/mmap_prot.in: -------------------------------------------------------------------------------- 1 | PROT_NONE 2 | PROT_READ 3 | PROT_WRITE 4 | PROT_EXEC 5 | PROT_SEM 6 | PROT_GROWSDOWN 7 | PROT_GROWSUP 8 | PROT_SAO 9 | -------------------------------------------------------------------------------- /xlat/perf_event_open_flags.in: -------------------------------------------------------------------------------- 1 | PERF_FLAG_FD_NO_GROUP 1 2 | PERF_FLAG_FD_OUTPUT 2 3 | PERF_FLAG_PID_CGROUP 4 4 | PERF_FLAG_FD_CLOEXEC 8 5 | -------------------------------------------------------------------------------- /xlat/pr_cap_ambient.in: -------------------------------------------------------------------------------- 1 | PR_CAP_AMBIENT_IS_SET 1 2 | PR_CAP_AMBIENT_RAISE 2 3 | PR_CAP_AMBIENT_LOWER 3 4 | PR_CAP_AMBIENT_CLEAR_ALL 4 5 | -------------------------------------------------------------------------------- /xlat/seccomp_ret_action.in: -------------------------------------------------------------------------------- 1 | SECCOMP_RET_KILL 2 | SECCOMP_RET_TRAP 3 | SECCOMP_RET_ERRNO 4 | SECCOMP_RET_TRACE 5 | SECCOMP_RET_ALLOW 6 | -------------------------------------------------------------------------------- /tests/fchmodat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of fchmodat syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/fchownat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of fchownat syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/fdatasync.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fdatasync syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a14 7 | -------------------------------------------------------------------------------- /tests/ftruncate.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check ftruncate syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a24 7 | -------------------------------------------------------------------------------- /tests/getrusage.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getrusage syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -v 7 | -------------------------------------------------------------------------------- /tests/mincore.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check mincore syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a22 7 | -------------------------------------------------------------------------------- /tests/mkdirat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check mkdirat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a36 7 | -------------------------------------------------------------------------------- /tests/pwritev.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check pwritev syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a22 -s7 7 | -------------------------------------------------------------------------------- /tests/readlink.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check readlink syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -xx 7 | -------------------------------------------------------------------------------- /tests/sendfile.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sendfile syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a27 7 | -------------------------------------------------------------------------------- /tests/sigaltstack.expected: -------------------------------------------------------------------------------- 1 | sigaltstack({ss_sp=0xbaadf00d, ss_flags=SS_DISABLE, ss_size=3735928559}, NULL) = 0 2 | +++ exited with 0 +++ 3 | -------------------------------------------------------------------------------- /tests/sysinfo.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of sysinfo syscall 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a14 7 | -------------------------------------------------------------------------------- /tests/truncate64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check truncate64 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/unlinkat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check unlinkat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a35 7 | -------------------------------------------------------------------------------- /linux/arc/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct user_regs_struct arc_regs; 2 | #define ARCH_REGS_FOR_GETREGSET arc_regs 3 | #define ARCH_PC_REG arc_regs.efa 4 | -------------------------------------------------------------------------------- /linux/avr32/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct pt_regs avr32_regs; 2 | #define ARCH_REGS_FOR_GETREGS avr32_regs 3 | #define ARCH_PC_REG avr32_regs.pc 4 | -------------------------------------------------------------------------------- /linux/sock_diag.h: -------------------------------------------------------------------------------- 1 | #define SOCK_DIAG_BY_FAMILY 20 2 | 3 | struct sock_diag_req { 4 | uint8_t sdiag_family; 5 | uint8_t sdiag_protocol; 6 | }; 7 | -------------------------------------------------------------------------------- /native_defs.h: -------------------------------------------------------------------------------- 1 | #undef MPERS_PRINTER_NAME 2 | #define MPERS_PRINTER_NAME(printer_name) printer_name 3 | 4 | #include "native_printer_decls.h" 5 | -------------------------------------------------------------------------------- /tests/ftruncate64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check ftruncate64 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a36 7 | -------------------------------------------------------------------------------- /tests/membarrier.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check membarrier syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a36 7 | -------------------------------------------------------------------------------- /tests/openat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check openat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -P $NAME.sample 7 | -------------------------------------------------------------------------------- /tests/rt_sigprocmask.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check rt_sigprocmask syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/sendfile64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sendfile64 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a29 7 | -------------------------------------------------------------------------------- /tests/sethostname.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sethostname syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a22 7 | -------------------------------------------------------------------------------- /tests/timer_create.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check timer_create syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/times.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of times syscall 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -esignal=none 7 | -------------------------------------------------------------------------------- /tests/userfaultfd.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check userfaultfd syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a38 7 | -------------------------------------------------------------------------------- /tests/xattr.expected: -------------------------------------------------------------------------------- 1 | removexattr\("\.", "strace\.test"\) += -1 .* 2 | setxattr\("\.", "strace\.test", "foo\\0bar", 8, XATTR_CREATE\) += -1 .* 3 | -------------------------------------------------------------------------------- /umask.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(umask) 4 | { 5 | tprintf("%#lo", tcp->u_arg[0]); 6 | 7 | return RVAL_DECODED | RVAL_OCTAL; 8 | } 9 | -------------------------------------------------------------------------------- /xlat/fan_init_flags.in: -------------------------------------------------------------------------------- 1 | FAN_CLOEXEC 0x00000001 2 | FAN_NONBLOCK 0x00000002 3 | FAN_UNLIMITED_QUEUE 0x00000010 4 | FAN_UNLIMITED_MARKS 0x00000020 5 | -------------------------------------------------------------------------------- /xlat/flockcmds.in: -------------------------------------------------------------------------------- 1 | LOCK_SH 1 2 | LOCK_EX 2 3 | LOCK_NB 4 4 | LOCK_UN 8 5 | LOCK_MAND 32 6 | LOCK_RW 192 7 | LOCK_READ 64 8 | LOCK_WRITE 128 9 | -------------------------------------------------------------------------------- /xlat/mtd_nandecc_options.in: -------------------------------------------------------------------------------- 1 | MTD_NANDECC_OFF 2 | MTD_NANDECC_PLACE 3 | MTD_NANDECC_AUTOPLACE 4 | MTD_NANDECC_PLACEONLY 5 | MTD_NANDECC_AUTOPL_USR 6 | -------------------------------------------------------------------------------- /xlat/swap_flags.in: -------------------------------------------------------------------------------- 1 | SWAP_FLAG_PREFER 0x8000 2 | SWAP_FLAG_DISCARD 0x10000 3 | SWAP_FLAG_DISCARD_ONCE 0x20000 4 | SWAP_FLAG_DISCARD_PAGES 0x40000 5 | -------------------------------------------------------------------------------- /linux/metag/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct user_gp_regs metag_regs; 2 | #define ARCH_REGS_FOR_GETREGSET metag_regs 3 | #define ARCH_PC_REG metag_regs.pc 4 | -------------------------------------------------------------------------------- /linux/or1k/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct user_regs_struct or1k_regs; 2 | #define ARCH_REGS_FOR_GETREGSET or1k_regs 3 | #define ARCH_PC_REG or1k_regs.pc 4 | -------------------------------------------------------------------------------- /linux/tile/arch_regs.c: -------------------------------------------------------------------------------- 1 | struct pt_regs tile_regs; /* not static */ 2 | #define ARCH_REGS_FOR_GETREGS tile_regs 3 | #define ARCH_PC_REG tile_regs.pc 4 | -------------------------------------------------------------------------------- /linux/x32/arch_regs.c: -------------------------------------------------------------------------------- 1 | #include "x86_64/arch_regs.c" 2 | #define ARCH_PC_REG (x86_io.iov_len == sizeof(i386_regs) ? i386_regs.eip : x86_64_regs.rip) 3 | -------------------------------------------------------------------------------- /tests/copy_file_range.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check copy_file_range syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/epoll_create1.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check epoll_create1 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a28 7 | -------------------------------------------------------------------------------- /tests/getrandom.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getrandom syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a32 -xx -s3 7 | -------------------------------------------------------------------------------- /tests/open.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check open syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a30 -P $NAME.sample 7 | -------------------------------------------------------------------------------- /tests/rt_sigpending.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check rt_sigpending syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a20 7 | -------------------------------------------------------------------------------- /tests/sync_file_range.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sync_file_range syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/sync_file_range2.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sync_file_range2 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff 7 | -------------------------------------------------------------------------------- /tests/vmsplice.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of vmsplice syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -ewrite=1 7 | -------------------------------------------------------------------------------- /xlat/at_flags.in: -------------------------------------------------------------------------------- 1 | AT_SYMLINK_NOFOLLOW 0x100 2 | AT_REMOVEDIR 0x200 3 | AT_SYMLINK_FOLLOW 0x400 4 | AT_NO_AUTOMOUNT 0x800 5 | AT_EMPTY_PATH 0x1000 6 | -------------------------------------------------------------------------------- /xlat/bpf_op_jmp.in: -------------------------------------------------------------------------------- 1 | BPF_JA 2 | BPF_JEQ 3 | BPF_JGT 4 | BPF_JGE 5 | BPF_JSET 6 | BPF_JNE 7 | BPF_JSGT 8 | BPF_JSGE 9 | BPF_CALL 10 | BPF_EXIT 11 | -------------------------------------------------------------------------------- /xlat/efd_flags.in: -------------------------------------------------------------------------------- 1 | EFD_SEMAPHORE 1 2 | #if defined EFD_CLOEXEC || defined O_CLOEXEC 3 | EFD_CLOEXEC O_CLOEXEC 4 | #endif 5 | EFD_NONBLOCK O_NONBLOCK 6 | -------------------------------------------------------------------------------- /xlat/futexwakecmps.in: -------------------------------------------------------------------------------- 1 | FUTEX_OP_CMP_EQ 0 2 | FUTEX_OP_CMP_NE 1 3 | FUTEX_OP_CMP_LT 2 4 | FUTEX_OP_CMP_LE 3 5 | FUTEX_OP_CMP_GT 4 6 | FUTEX_OP_CMP_GE 5 7 | -------------------------------------------------------------------------------- /xlat/mtd_file_mode_options.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | MTD_FILE_MODE_NORMAL 3 | MTD_FILE_MODE_OTP_FACTORY 4 | MTD_FILE_MODE_OTP_USER 5 | MTD_FILE_MODE_RAW 6 | -------------------------------------------------------------------------------- /linux/powerpc/arch_regs.c: -------------------------------------------------------------------------------- 1 | struct pt_regs ppc_regs; /* not static */ 2 | 3 | #define ARCH_REGS_FOR_GETREGS ppc_regs 4 | #define ARCH_PC_REG ppc_regs.nip 5 | -------------------------------------------------------------------------------- /linux/sparc/arch_regs.c: -------------------------------------------------------------------------------- 1 | struct pt_regs sparc_regs; /* not static */ 2 | #define ARCH_REGS_FOR_GETREGS sparc_regs 3 | #define ARCH_PC_REG sparc_regs.pc 4 | -------------------------------------------------------------------------------- /tests/rt_sigtimedwait.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check rt_sigtimedwait syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a38 7 | -------------------------------------------------------------------------------- /tests/statx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of stat family syscalls. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -v -P $NAME.sample 7 | -------------------------------------------------------------------------------- /xlat/advise.in: -------------------------------------------------------------------------------- 1 | POSIX_FADV_NORMAL 2 | POSIX_FADV_RANDOM 3 | POSIX_FADV_SEQUENTIAL 4 | POSIX_FADV_WILLNEED 5 | POSIX_FADV_DONTNEED 6 | POSIX_FADV_NOREUSE 7 | -------------------------------------------------------------------------------- /xlat/bootflags2.in: -------------------------------------------------------------------------------- 1 | LINUX_REBOOT_MAGIC2 672274793 2 | LINUX_REBOOT_MAGIC2A 85072278 3 | LINUX_REBOOT_MAGIC2B 369367448 4 | LINUX_REBOOT_MAGIC2C 537993216 5 | -------------------------------------------------------------------------------- /xlat/bt_protocols.in: -------------------------------------------------------------------------------- 1 | BTPROTO_L2CAP 2 | BTPROTO_HCI 3 | BTPROTO_SCO 4 | BTPROTO_RFCOMM 5 | BTPROTO_BNEP 6 | BTPROTO_CMTP 7 | BTPROTO_HIDP 8 | BTPROTO_AVDTP 9 | -------------------------------------------------------------------------------- /xlat/evdev_relative_axes.in: -------------------------------------------------------------------------------- 1 | REL_X 2 | REL_Y 3 | REL_Z 4 | REL_RX 5 | REL_RY 6 | REL_RZ 7 | REL_HWHEEL 8 | REL_DIAL 9 | REL_WHEEL 10 | REL_MISC 11 | -------------------------------------------------------------------------------- /xlat/mtd_type_options.in: -------------------------------------------------------------------------------- 1 | MTD_ABSENT 2 | MTD_RAM 3 | MTD_ROM 4 | MTD_NORFLASH 5 | MTD_NANDFLASH 6 | MTD_DATAFLASH 7 | MTD_UBIVOLUME 8 | MTD_MLCNANDFLASH 9 | -------------------------------------------------------------------------------- /xlat/sigfpe_codes.in: -------------------------------------------------------------------------------- 1 | FPE_INTDIV 1 2 | FPE_INTOVF 2 3 | FPE_FLTDIV 3 4 | FPE_FLTOVF 4 5 | FPE_FLTUND 5 6 | FPE_FLTRES 6 7 | FPE_FLTINV 7 8 | FPE_FLTSUB 8 9 | -------------------------------------------------------------------------------- /xlat/sigill_codes.in: -------------------------------------------------------------------------------- 1 | ILL_ILLOPC 1 2 | ILL_ILLOPN 2 3 | ILL_ILLADR 3 4 | ILL_ILLTRP 4 5 | ILL_PRVOPC 5 6 | ILL_PRVREG 6 7 | ILL_COPROC 7 8 | ILL_BADSTK 8 9 | -------------------------------------------------------------------------------- /linux/bfin/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | return upeek(tcp->pid, PT_R0, &bfin_r0) < 0 ? -1 : 0; 5 | } 6 | -------------------------------------------------------------------------------- /linux/hppa/arch_regs.h: -------------------------------------------------------------------------------- 1 | #define PT_GR20 (20*4) 2 | #define PT_GR26 (26*4) 3 | #define PT_GR28 (28*4) 4 | #define PT_IAOQ0 (106*4) 5 | #define PT_IAOQ1 (107*4) 6 | -------------------------------------------------------------------------------- /linux/nios2/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct user_pt_regs nios2_regs; 2 | # define ARCH_REGS_FOR_GETREGSET nios2_regs 3 | #define ARCH_PC_REG nios2_regs.regs[PTR_EA] 4 | -------------------------------------------------------------------------------- /tests/seccomp.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how SECCOMP_MODE_FILTER is decoded. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -v -e trace=prctl 7 | -------------------------------------------------------------------------------- /xlat/af_packet_types.in: -------------------------------------------------------------------------------- 1 | PACKET_HOST 2 | PACKET_BROADCAST 3 | PACKET_MULTICAST 4 | PACKET_OTHERHOST 5 | PACKET_OUTGOING 6 | PACKET_LOOPBACK 7 | PACKET_FASTROUTE 8 | -------------------------------------------------------------------------------- /xlat/pollflags.in: -------------------------------------------------------------------------------- 1 | POLLIN 2 | POLLPRI 3 | POLLOUT 4 | POLLRDNORM 5 | POLLWRNORM 6 | POLLRDBAND 7 | POLLWRBAND 8 | POLLERR 9 | POLLHUP 10 | POLLNVAL 11 | -------------------------------------------------------------------------------- /linux/alpha/arch_getrval2.c: -------------------------------------------------------------------------------- 1 | long 2 | getrval2(struct tcb *tcp) 3 | { 4 | long r20; 5 | if (upeek(tcp->pid, 20, &r20) < 0) 6 | return -1; 7 | return r20; 8 | } 9 | -------------------------------------------------------------------------------- /linux/arm/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm/include/ tree. */ 2 | { "asm/ioctls.h", "FIOQSIZE", 0, 0x545E, 0 }, 3 | -------------------------------------------------------------------------------- /linux/hppa/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | return upeek(tcp->pid, PT_GR28, &hppa_r28) < 0 ? -1 : 0; 5 | } 6 | -------------------------------------------------------------------------------- /linux/m68k/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | return upeek(tcp->pid, 4 * PT_D0, &m68k_d0) < 0 ? -1 : 0; 5 | } 6 | -------------------------------------------------------------------------------- /tests/inet-cmsg.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check IPPROTO_IP control messages decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -e trace=recvmsg 7 | -------------------------------------------------------------------------------- /tests/rt_sigqueueinfo.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of rt_sigqueueinfo syscall 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -esignal=none 7 | -------------------------------------------------------------------------------- /tests/rt_sigsuspend.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check rt_sigsuspend syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a20 -esignal=none 7 | -------------------------------------------------------------------------------- /tests/times-fail.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of failing times syscall 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a12 -e trace=times 7 | -------------------------------------------------------------------------------- /xlat/bpf_commands.in: -------------------------------------------------------------------------------- 1 | BPF_MAP_CREATE 0 2 | BPF_MAP_LOOKUP_ELEM 1 3 | BPF_MAP_UPDATE_ELEM 2 4 | BPF_MAP_DELETE_ELEM 3 5 | BPF_MAP_GET_NEXT_KEY 4 6 | BPF_PROG_LOAD 5 7 | -------------------------------------------------------------------------------- /xlat/cap_mask1.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | 1<pid, 4 * PT_R10, &cris_r10) < 0 ? -1 : 0; 5 | } 6 | -------------------------------------------------------------------------------- /tests/execveat-v.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check verbose decoding of execveat syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -v -e trace=execveat 7 | -------------------------------------------------------------------------------- /tests/readdir.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check readdir syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | rm -rf -- "$LOG".dir 8 | run_strace_match_diff -a16 9 | -------------------------------------------------------------------------------- /tests/rt_tgsigqueueinfo.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of rt_tgsigqueueinfo syscall 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -esignal=none 7 | -------------------------------------------------------------------------------- /tests/swap.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check swapon and swapoff syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a23 -e trace=swapon,swapoff 7 | -------------------------------------------------------------------------------- /xlat/bpf_prog_types.in: -------------------------------------------------------------------------------- 1 | BPF_PROG_TYPE_UNSPEC 0 2 | BPF_PROG_TYPE_SOCKET_FILTER 1 3 | BPF_PROG_TYPE_KPROBE 2 4 | BPF_PROG_TYPE_SCHED_CLS 3 5 | BPF_PROG_TYPE_SCHED_ACT 4 6 | -------------------------------------------------------------------------------- /linux/microblaze/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | return upeek(tcp->pid, 3 * 4, µblaze_r3) < 0 ? -1 : 0; 5 | } 6 | -------------------------------------------------------------------------------- /linux/nios2/syscallent.h: -------------------------------------------------------------------------------- 1 | #define sys_ARCH_mmap sys_mmap_pgoff 2 | #include "32/syscallent.h" 3 | [244] = {4, 0, SEN(cacheflush), "cacheflush"}, 4 | [245 ... 259] = { }, 5 | -------------------------------------------------------------------------------- /linux/or1k/syscallent.h: -------------------------------------------------------------------------------- 1 | #define sys_ARCH_mmap sys_mmap_pgoff 2 | #include "32/syscallent.h" 3 | [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" }, 4 | [245 ... 259] = { }, 5 | -------------------------------------------------------------------------------- /linux/sh/arch_getrval2.c: -------------------------------------------------------------------------------- 1 | long 2 | getrval2(struct tcb *tcp) 3 | { 4 | long val; 5 | if (upeek(tcp->pid, 4*(REG_REG0+1), &val) < 0) 6 | return -1; 7 | return val; 8 | } 9 | -------------------------------------------------------------------------------- /linux/xtensa/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | return upeek(tcp->pid, REG_A_BASE + 2, &xtensa_a2) < 0 ? -1 : 0; 5 | } 6 | -------------------------------------------------------------------------------- /tests/getdents.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getdents syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | rm -rf -- "$LOG".dir 8 | run_strace_match_diff -a22 -v 9 | -------------------------------------------------------------------------------- /tests/getdents64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getdents64 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | rm -rf -- "$LOG".dir 8 | run_strace_match_diff -a24 -v 9 | -------------------------------------------------------------------------------- /tests/xetpgid.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getpgid and setpgid syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a11 -e trace=getpgid,setpgid 7 | -------------------------------------------------------------------------------- /xlat/falloc_flags.in: -------------------------------------------------------------------------------- 1 | FALLOC_FL_KEEP_SIZE 2 | FALLOC_FL_PUNCH_HOLE 3 | FALLOC_FL_NO_HIDE_STALE 4 | FALLOC_FL_COLLAPSE_RANGE 5 | FALLOC_FL_ZERO_RANGE 6 | FALLOC_FL_INSERT_RANGE 7 | -------------------------------------------------------------------------------- /linux/mips/syscallent.h: -------------------------------------------------------------------------------- 1 | #include "../dummy.h" 2 | #include "syscallent-compat.h" 3 | #include "syscallent-o32.h" 4 | #include "syscallent-n64.h" 5 | #include "syscallent-n32.h" 6 | -------------------------------------------------------------------------------- /tests/strace-r.expected: -------------------------------------------------------------------------------- 1 | [ ]{5}0\.0{6} execve\("\./sleep", \["\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0 2 | [ ]{5}(1\.0|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+ 3 | -------------------------------------------------------------------------------- /tests/xetitimer.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check setitimer and getitimer syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -e trace=setitimer,getitimer 7 | -------------------------------------------------------------------------------- /xlat/modem_flags.in: -------------------------------------------------------------------------------- 1 | TIOCM_LE 2 | TIOCM_DTR 3 | TIOCM_RTS 4 | TIOCM_ST 5 | TIOCM_SR 6 | TIOCM_CTS 7 | TIOCM_CAR 8 | TIOCM_CD 9 | TIOCM_RNG 10 | TIOCM_RI 11 | TIOCM_DSR 12 | -------------------------------------------------------------------------------- /tests/fork-f.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how strace -f follows fork syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a26 -qq -f -e trace=chdir -e signal=none 7 | -------------------------------------------------------------------------------- /tests/nanosleep.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check nanosleep and setitimer syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a20 -e trace=nanosleep,setitimer 7 | -------------------------------------------------------------------------------- /tests/strace-r.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check -r option. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog ./sleep 0 8 | run_strace -r -eexecve ./sleep 1 9 | match_grep 10 | -------------------------------------------------------------------------------- /xlat/bpf_op_alu.in: -------------------------------------------------------------------------------- 1 | BPF_ADD 2 | BPF_SUB 3 | BPF_MUL 4 | BPF_DIV 5 | BPF_OR 6 | BPF_AND 7 | BPF_LSH 8 | BPF_RSH 9 | BPF_NEG 10 | BPF_MOD 11 | BPF_XOR 12 | BPF_MOV 13 | BPF_ARSH 14 | -------------------------------------------------------------------------------- /xlat/evdev_leds.in: -------------------------------------------------------------------------------- 1 | LED_NUML 2 | LED_CAPSL 3 | LED_SCROLLL 4 | LED_COMPOSE 5 | LED_KANA 6 | LED_SLEEP 7 | LED_SUSPEND 8 | LED_MUTE 9 | LED_MISC 10 | LED_MAIL 11 | LED_CHARGING 12 | -------------------------------------------------------------------------------- /xlat/ip_cmsg_types.in: -------------------------------------------------------------------------------- 1 | IP_TOS 1 2 | IP_TTL 2 3 | IP_RECVOPTS 6 4 | IP_RETOPTS 7 5 | IP_PKTINFO 8 6 | IP_RECVERR 11 7 | IP_ORIGDSTADDR 20 8 | IP_CHECKSUM 23 9 | SCM_SECURITY 10 | -------------------------------------------------------------------------------- /linux/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | #warning sigreturn/rt_sigreturn signal mask decoding is not implemented for this architecture 2 | 3 | static void 4 | arch_sigreturn(struct tcb *tcp) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /linux/arm/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct pt_regs arm_regs; 2 | long *const arm_sp_ptr = &arm_regs.ARM_sp; 3 | 4 | #define ARCH_REGS_FOR_GETREGS arm_regs 5 | #define ARCH_PC_REG arm_regs.ARM_pc 6 | -------------------------------------------------------------------------------- /linux/avr32/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = avr32_regs.r8; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /linux/or1k/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = or1k_regs.gpr[11]; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /linux/sparc64/userent.h: -------------------------------------------------------------------------------- 1 | XLAT_UOFF(u_tsize), 2 | XLAT_UOFF(u_dsize), 3 | XLAT_UOFF(u_ssize), 4 | XLAT_UOFF(signal), 5 | XLAT_UOFF(magic), 6 | XLAT_UOFF(u_comm), 7 | #include "../userent0.h" 8 | -------------------------------------------------------------------------------- /linux/tile/syscallent.h: -------------------------------------------------------------------------------- 1 | #include "64/syscallent.h" 2 | [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, 3 | [245] = { 3, 0, SEN(printargs), "cacheflush" }, 4 | [246 ... 259] = { }, 5 | -------------------------------------------------------------------------------- /tests/mmap64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check mmap/mprotect/munmap syscalls decoding. 4 | # Target executable was compiled with -D_FILE_OFFSET_BITS=64. 5 | 6 | . "${srcdir=.}/mmap.test" 7 | -------------------------------------------------------------------------------- /tests/readv.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of readv and writev syscalls. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a16 -eread=0 -ewrite=1 -e trace=readv,writev 7 | -------------------------------------------------------------------------------- /tests/strace-T.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check -T option. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog ./sleep 0 8 | run_strace -a24 -T -enanosleep ./sleep 1 9 | match_grep 10 | -------------------------------------------------------------------------------- /ioperm.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(ioperm) 4 | { 5 | tprintf("%#lx, %#lx, %d", 6 | tcp->u_arg[0], tcp->u_arg[1], (int) tcp->u_arg[2]); 7 | 8 | return RVAL_DECODED; 9 | } 10 | -------------------------------------------------------------------------------- /linux/arc/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = arc_regs.scratch.r8; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /linux/i386/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = i386_regs.orig_eax; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /linux/nios2/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = nios2_regs.regs[2]; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /linux/powerpc/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = ppc_regs.gpr[0]; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /tests/getxxid.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getxpid, getxuid, and getxgid syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a10 -e trace=getxpid,getxuid,getxgid 7 | -------------------------------------------------------------------------------- /tests/mmsg.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how iovecs in struct mmsghdr are decoded. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 7 | -------------------------------------------------------------------------------- /tests/recvmsg.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of recvmsg and sendmsg syscalls. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -eread=0 -ewrite=1 -e trace=recvmsg,sendmsg 7 | -------------------------------------------------------------------------------- /tests/xetpriority.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check getpriority and setpriority syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a29 -e trace=getpriority,setpriority 7 | -------------------------------------------------------------------------------- /xlat/evdev_prop.in: -------------------------------------------------------------------------------- 1 | INPUT_PROP_POINTER 2 | INPUT_PROP_DIRECT 3 | INPUT_PROP_BUTTONPAD 4 | INPUT_PROP_SEMI_MT 5 | INPUT_PROP_TOPBUTTONPAD 6 | INPUT_PROP_POINTING_STICK 7 | INPUT_PROP_ACCELEROMETER 8 | -------------------------------------------------------------------------------- /xlat/semctl_flags.in: -------------------------------------------------------------------------------- 1 | IPC_RMID 2 | IPC_SET 3 | IPC_STAT 4 | IPC_INFO 5 | SEM_STAT 18 6 | SEM_INFO 19 7 | GETPID 8 | GETVAL 9 | GETALL 10 | GETNCNT 11 | GETZCNT 12 | SETVAL 13 | SETALL 14 | -------------------------------------------------------------------------------- /generate_sen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | echo 'enum {' 4 | echo 'SEN_printargs = 0,' 5 | sed -n '/printargs/! s/.*SEN(\([^)]*\)).*/\1/p' | 6 | sort -u | 7 | sed 's/.*/SEN_&,/' 8 | echo '};' 9 | -------------------------------------------------------------------------------- /linux/dummy_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | grep '^#define' dummy.h | cut -f2 | \ 4 | while read func; do 5 | grep -q -F -- "${func}(" syscall.h && echo "Defined as macro and as func: $func" 6 | done 7 | -------------------------------------------------------------------------------- /linux/i386/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct user_regs_struct i386_regs; 2 | long *const i386_esp_ptr = &i386_regs.esp; 3 | 4 | #define ARCH_REGS_FOR_GETREGS i386_regs 5 | #define ARCH_PC_REG i386_regs.eip 6 | -------------------------------------------------------------------------------- /tests/eventfd.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check eventfd2 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -e eventfd2 $args 9 | match_diff 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/sigaction.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check rt_sigaction decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -ert_sigaction $args 9 | match_awk 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/xettimeofday.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check gettimeofday and settimeofday syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a20 -e trace=gettimeofday,settimeofday 7 | -------------------------------------------------------------------------------- /xlat/xfs_quota_flags.in: -------------------------------------------------------------------------------- 1 | XFS_QUOTA_UDQ_ACCT (1<<0) 2 | XFS_QUOTA_UDQ_ENFD (1<<1) 3 | XFS_QUOTA_GDQ_ACCT (1<<2) 4 | XFS_QUOTA_GDQ_ENFD (1<<3) 5 | XFS_QUOTA_PDQ_ACCT (1<<4) 6 | XFS_QUOTA_PDQ_ENFD (1<<5) 7 | -------------------------------------------------------------------------------- /linux/bfin/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | return upeek(tcp->pid, PT_ORIG_P0, &tcp->scno) < 0 ? -1 : 1; 6 | } 7 | -------------------------------------------------------------------------------- /linux/hppa/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | return upeek(tcp->pid, PT_GR20, &tcp->scno) < 0 ? -1 : 1; 6 | } 7 | -------------------------------------------------------------------------------- /linux/microblaze/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | return upeek(tcp->pid, 0, &tcp->scno) < 0 ? -1 : 1; 6 | } 7 | -------------------------------------------------------------------------------- /linux/sparc/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = sparc_regs.u_regs[U_REG_G1]; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /tests/signalfd.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check signalfd4 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -e signalfd4 $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/umovestr.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # umovestr short read regression test 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -e chdir $args 9 | match_diff 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /linux/crisv10/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | return upeek(tcp->pid, 4 * PT_R9, &tcp->scno) < 0 ? -1 : 1; 6 | } 7 | -------------------------------------------------------------------------------- /linux/m68k/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | return upeek(tcp->pid, 4 * PT_ORIG_D0, &tcp->scno) < 0 ? -1 : 1; 6 | } 7 | -------------------------------------------------------------------------------- /linux/xtensa/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | return upeek(tcp->pid, SYSCALL_NR, &tcp->scno) < 0 ? -1 : 1; 6 | } 7 | -------------------------------------------------------------------------------- /tests/oldselect.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check old select syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -a34 -eselect $args 9 | match_diff 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/sched_xetparam.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sched_getparam and sched_setparam syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a23 -e trace=sched_getparam,sched_setparam 7 | -------------------------------------------------------------------------------- /tests/sigaltstack.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sigaltstack syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -e sigaltstack $args 9 | match_diff 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/xattr.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check *xattr syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -e removexattr,setxattr $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /linux/32/ioctls_inc.h: -------------------------------------------------------------------------------- 1 | #if defined X86_64 || defined X32 \ 2 | || SIZEOF_STRUCT_I64_I32 < SIZEOF_LONG_LONG * 2 3 | # include "32/ioctls_inc_align32.h" 4 | #else 5 | # include "32/ioctls_inc_align64.h" 6 | #endif 7 | -------------------------------------------------------------------------------- /linux/alpha/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | return (upeek(tcp->pid, REG_A3, &alpha_a3) < 0 || 5 | upeek(tcp->pid, REG_R0, &alpha_r0) < 0) ? -1 : 0; 6 | } 7 | -------------------------------------------------------------------------------- /tests/fanotify_mark.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fanotify_mark syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -efanotify_mark $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/file_handle.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check name_to_handle_at and open_by_handle_at syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -e trace=name_to_handle_at,open_by_handle_at 7 | -------------------------------------------------------------------------------- /tests/memfd_create.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check memfd_create syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -e memfd_create $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/preadv-pwritev.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding and dumping of preadv and pwritev syscalls. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev 7 | -------------------------------------------------------------------------------- /tests/wait.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check wait4 and waitid syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -v -e wait4,waitid $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/xet_robust_list.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check get_robust_list and set_robust_list syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a24 -e trace=get_robust_list,set_robust_list 7 | -------------------------------------------------------------------------------- /linux/mips/arch_regs.c: -------------------------------------------------------------------------------- 1 | struct mips_regs mips_regs; /* not static */ 2 | /* PTRACE_GETREGS on MIPS is available since linux v2.6.15. */ 3 | #define ARCH_REGS_FOR_GETREGS mips_regs 4 | #define ARCH_PC_REG mips_REG_EPC 5 | -------------------------------------------------------------------------------- /linux/sh/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | /* new syscall ABI returns result in R0 */ 5 | return upeek(tcp->pid, 4 * REG_REG0, (long *)&sh_r0) < 0 ? -1 : 0; 6 | } 7 | -------------------------------------------------------------------------------- /tests/aio.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check io_* syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | syscalls=io_setup,io_submit,io_getevents,io_cancel,io_destroy 8 | run_strace_match_diff -a14 -e trace=$syscalls 9 | -------------------------------------------------------------------------------- /tests/caps.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check capget/capset syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -a 19 -e trace=capget,capset $args 9 | match_awk 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/strace-f.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Ensure that strace -f works. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | time=/usr/bin/time 8 | check_prog $time 9 | check_prog ls 10 | run_strace -f $time ls > /dev/null 11 | -------------------------------------------------------------------------------- /xlat/v4l2_buf_flags.in: -------------------------------------------------------------------------------- 1 | V4L2_BUF_FLAG_MAPPED 2 | V4L2_BUF_FLAG_QUEUED 3 | V4L2_BUF_FLAG_DONE 4 | V4L2_BUF_FLAG_KEYFRAME 5 | V4L2_BUF_FLAG_PFRAME 6 | V4L2_BUF_FLAG_BFRAME 7 | V4L2_BUF_FLAG_TIMECODE 8 | V4L2_BUF_FLAG_INPUT 9 | -------------------------------------------------------------------------------- /linux/ia64/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = ia64_ia32mode ? ia64_regs.gr[0] : ia64_regs.gr[15]; 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /linux/sh64/get_syscall_result.c: -------------------------------------------------------------------------------- 1 | static int 2 | get_syscall_result_regs(struct tcb *tcp) 3 | { 4 | /* ABI defines result returned in r9 */ 5 | return upeek(tcp->pid, REG_GENERAL(9), (long *)&sh64_r9) < 0 ? -1 : 0; 6 | } 7 | -------------------------------------------------------------------------------- /tests/count-f.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check whether -c counts through forks and clones properly 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -q -f -c $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/sched_xetaffinity.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sched_getaffinity and sched_setaffinity syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a28 -e trace=sched_getaffinity,sched_setaffinity 7 | -------------------------------------------------------------------------------- /tests/uio.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how pread/pwrite and preadv/pwritev syscalls are traced. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -edesc $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /xlat/siginfo_codes.in: -------------------------------------------------------------------------------- 1 | SI_USER 0 2 | SI_KERNEL 0x80 3 | SI_QUEUE -1 4 | SI_TIMER -2 5 | SI_MESGQ -3 6 | SI_ASYNCIO -4 7 | SI_SIGIO -5 8 | SI_TKILL -6 9 | SI_DETHREAD -7 10 | SI_ASYNCNL -60 11 | SI_NOINFO 12 | SI_LWP 13 | -------------------------------------------------------------------------------- /xlat/sysctl_root.in: -------------------------------------------------------------------------------- 1 | CTL_KERN 2 | CTL_VM 3 | CTL_NET 4 | CTL_PROC 5 | CTL_FS 6 | CTL_DEBUG 7 | CTL_DEV 8 | CTL_BUS 9 | CTL_ABI 10 | CTL_CPU 11 | CTL_ARLAN 12 | CTL_S390DBF 13 | CTL_SUNRPC 14 | CTL_PM 15 | CTL_FRV 16 | -------------------------------------------------------------------------------- /tests/clock_nanosleep.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check clock_nanosleep, clock_gettime, and setitimer syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -e trace=clock_nanosleep,clock_gettime,setitimer 7 | -------------------------------------------------------------------------------- /tests/ip_mreq.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check {IP,IPV6}_{ADD,DROP}_MEMBERSHIP setsockopt decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -e setsockopt $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/sched_xetscheduler.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sched_getscheduler and sched_setscheduler syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a22 -e trace=sched_getscheduler,sched_setscheduler 7 | -------------------------------------------------------------------------------- /tests/timer_xettime.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check timer_create, timer_settime, and timer_gettime syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -e trace=timer_create,timer_settime,timer_gettime 7 | -------------------------------------------------------------------------------- /xlat/wait4_options.in: -------------------------------------------------------------------------------- 1 | WNOHANG 2 | #ifndef WSTOPPED 3 | WUNTRACED 4 | #endif 5 | WEXITED 6 | WTRAPPED 7 | WSTOPPED 8 | WCONTINUED 9 | WNOWAIT 10 | __WCLONE 0x80000000 11 | __WALL 0x40000000 12 | __WNOTHREAD 0x20000000 13 | -------------------------------------------------------------------------------- /linux/metag/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = metag_regs.dx[0][1]; /* syscall number in D1Re0 (D1.0) */ 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /tests/clock_xettime.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check clock_getres, clock_gettime, and clock_settime syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a36 -e trace=clock_getres,clock_gettime,clock_settime 7 | -------------------------------------------------------------------------------- /xlat/loop_crypt_type_options.in: -------------------------------------------------------------------------------- 1 | LO_CRYPT_NONE 2 | LO_CRYPT_XOR 3 | LO_CRYPT_DES 4 | LO_CRYPT_FISH2 5 | LO_CRYPT_BLOW 6 | LO_CRYPT_CAST128 7 | LO_CRYPT_IDEA 8 | LO_CRYPT_DUMMY 9 | LO_CRYPT_SKIPJACK 10 | LO_CRYPT_CRYPTOAPI 11 | -------------------------------------------------------------------------------- /tests/bpf.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check bpf syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -ebpf $args > "$OUT" 9 | match_grep "$LOG" "$OUT" 10 | rm -f "$OUT" 11 | 12 | exit 0 13 | -------------------------------------------------------------------------------- /xlat/setsockipv6options.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Options specific to setsockopt(SOL_IPV6). 3 | * Common {g,s}etsockopt(SOL_IPV6) options 4 | * should be in sockipv6options.in instead. 5 | */ 6 | 7 | IP6T_SO_SET_REPLACE 8 | IP6T_SO_SET_ADD_COUNTERS 9 | -------------------------------------------------------------------------------- /linux/alpha/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (alpha_a3) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = alpha_r0; 7 | } else { 8 | tcp->u_rval = alpha_r0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/bfin/userent.h: -------------------------------------------------------------------------------- 1 | XLAT_UOFF(u_tsize), 2 | XLAT_UOFF(u_dsize), 3 | XLAT_UOFF(u_ssize), 4 | XLAT_UOFF(start_code), 5 | XLAT_UOFF(signal), 6 | XLAT_UOFF(u_ar0), 7 | XLAT_UOFF(magic), 8 | XLAT_UOFF(u_comm), 9 | #include "../userent0.h" 10 | -------------------------------------------------------------------------------- /tests/ipc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of ipc syscalls 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -eipc $args > "$OUT" 9 | match_grep "$LOG" "$OUT" 10 | 11 | rm -f "$OUT" 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /tests/net.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how network syscalls are traced. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog ./net-accept-connect net-local-stream 8 | run_strace_merge -enetwork $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/timerfd_xettime.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check timerfd_create, timerfd_settime, and timerfd_gettime syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -e trace=timerfd_create,timerfd_settime,timerfd_gettime 7 | -------------------------------------------------------------------------------- /tests/umask.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int 5 | main(void) 6 | { 7 | mode_t rc = umask(044); 8 | printf("umask(%#o) = %#o\n", 044, rc); 9 | 10 | puts("+++ exited with 0 +++"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /xlat/v4l2_control_flags.in: -------------------------------------------------------------------------------- 1 | V4L2_CTRL_FLAG_DISABLED 2 | V4L2_CTRL_FLAG_GRABBED 3 | V4L2_CTRL_FLAG_READ_ONLY 4 | V4L2_CTRL_FLAG_UPDATE 5 | V4L2_CTRL_FLAG_INACTIVE 6 | V4L2_CTRL_FLAG_SLIDER 7 | V4L2_CTRL_FLAG_WRITE_ONLY 8 | V4L2_CTRL_FLAG_VOLATILE 9 | -------------------------------------------------------------------------------- /linux/s390/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = s390_regset.gprs[2] ? 6 | s390_regset.gprs[2] : s390_regset.gprs[1]; 7 | return 1; 8 | } 9 | -------------------------------------------------------------------------------- /tests/ipc_msgbuf.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check msgget, msgsnd, msgrcv, msgctl syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -v -e msgget,msgsnd,msgrcv,msgctl $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/mq.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check mq_open, mq_getsetattr, mq_unlink syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -v -e mq_getsetattr,mq_open,mq_unlink $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/sched_get_priority_mxx.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sched_get_priority_min and sched_get_priority_max syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | run_strace_match_diff -a33 -e trace=sched_get_priority_min,sched_get_priority_max 7 | -------------------------------------------------------------------------------- /readahead.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(readahead) 4 | { 5 | int argn; 6 | 7 | printfd(tcp, tcp->u_arg[0]); 8 | argn = printllval(tcp, ", %lld", 1); 9 | tprintf(", %ld", tcp->u_arg[argn]); 10 | 11 | return RVAL_DECODED; 12 | } 13 | -------------------------------------------------------------------------------- /tests/filter-unavailable.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # check that syscalls are filtered properly 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -qq -f -echdir -esignal=none $args 9 | match_diff 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /xlat/bpf_map_types.in: -------------------------------------------------------------------------------- 1 | BPF_MAP_TYPE_UNSPEC 0 2 | BPF_MAP_TYPE_HASH 1 3 | BPF_MAP_TYPE_ARRAY 2 4 | BPF_MAP_TYPE_PROG_ARRAY 3 5 | BPF_MAP_TYPE_PERF_EVENT_ARRAY 4 6 | BPF_MAP_TYPE_PERCPU_HASH 5 7 | BPF_MAP_TYPE_PERCPU_ARRAY 6 8 | BPF_MAP_TYPE_STACK_TRACE 7 9 | -------------------------------------------------------------------------------- /xlat/epollevents.in: -------------------------------------------------------------------------------- 1 | EPOLLIN 2 | EPOLLPRI 3 | EPOLLOUT 4 | EPOLLRDNORM 5 | EPOLLRDBAND 6 | EPOLLWRNORM 7 | EPOLLWRBAND 8 | EPOLLMSG 9 | EPOLLERR 10 | EPOLLHUP 11 | EPOLLRDHUP 12 | EPOLLEXCLUSIVE 13 | EPOLLWAKEUP 14 | EPOLLONESHOT 15 | EPOLLET 16 | -------------------------------------------------------------------------------- /xlat/v4l2_colorspaces.in: -------------------------------------------------------------------------------- 1 | V4L2_COLORSPACE_SMPTE170M 2 | V4L2_COLORSPACE_SMPTE240M 3 | V4L2_COLORSPACE_REC709 4 | V4L2_COLORSPACE_BT878 5 | V4L2_COLORSPACE_470_SYSTEM_M 6 | V4L2_COLORSPACE_470_SYSTEM_BG 7 | V4L2_COLORSPACE_JPEG 8 | V4L2_COLORSPACE_SRGB 9 | -------------------------------------------------------------------------------- /tests/adjtimex.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check adjtimex syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -a 15 -e adjtimex $args > "$OUT" 9 | match_grep "$LOG" "$OUT" 10 | rm -f "$OUT" 11 | 12 | exit 0 13 | -------------------------------------------------------------------------------- /tests/get_page_size.c: -------------------------------------------------------------------------------- 1 | #include "tests.h" 2 | #include 3 | 4 | size_t 5 | get_page_size(void) 6 | { 7 | static size_t page_size; 8 | 9 | if (!page_size) 10 | page_size = sysconf(_SC_PAGESIZE); 11 | 12 | return page_size; 13 | } 14 | -------------------------------------------------------------------------------- /umount.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | #include "xlat/umount_flags.h" 3 | 4 | SYS_FUNC(umount2) 5 | { 6 | printpath(tcp, tcp->u_arg[0]); 7 | tprints(", "); 8 | printflags(umount_flags, tcp->u_arg[1], "MNT_???"); 9 | 10 | return RVAL_DECODED; 11 | } 12 | -------------------------------------------------------------------------------- /xlat/adjtimex_modes.in: -------------------------------------------------------------------------------- 1 | 0 2 | ADJ_OFFSET 3 | ADJ_FREQUENCY 4 | ADJ_MAXERROR 5 | ADJ_ESTERROR 6 | ADJ_STATUS 7 | ADJ_TIMECONST 8 | ADJ_TAI 9 | ADJ_SETOFFSET 10 | ADJ_MICRO 11 | ADJ_NANO 12 | ADJ_TICK 13 | ADJ_OFFSET_SINGLESHOT 14 | ADJ_OFFSET_SS_READ 15 | -------------------------------------------------------------------------------- /xlat/ptrace_events.in: -------------------------------------------------------------------------------- 1 | PTRACE_EVENT_FORK 2 | PTRACE_EVENT_VFORK 3 | PTRACE_EVENT_CLONE 4 | PTRACE_EVENT_EXEC 5 | PTRACE_EVENT_VFORK_DONE 6 | PTRACE_EVENT_EXIT 7 | PTRACE_EVENT_SECCOMP 8 | PTRACE_EVENT_STOP 9 | /* tile */ 10 | PTRACE_EVENT_MIGRATE 11 | -------------------------------------------------------------------------------- /xlat/v4l2_fields.in: -------------------------------------------------------------------------------- 1 | V4L2_FIELD_ANY 2 | V4L2_FIELD_NONE 3 | V4L2_FIELD_TOP 4 | V4L2_FIELD_BOTTOM 5 | V4L2_FIELD_INTERLACED 6 | V4L2_FIELD_SEQ_TB 7 | V4L2_FIELD_SEQ_BT 8 | V4L2_FIELD_ALTERNATE 9 | V4L2_FIELD_INTERLACED_TB 10 | V4L2_FIELD_INTERLACED_BT 11 | -------------------------------------------------------------------------------- /linux/sh/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(sh_r0)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -sh_r0; 7 | } else { 8 | tcp->u_rval = sh_r0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/sh64/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | if (upeek(tcp->pid, REG_SYSCALL, &tcp->scno) < 0) 6 | return -1; 7 | tcp->scno &= 0xffff; 8 | return 1; 9 | } 10 | -------------------------------------------------------------------------------- /xlat/personality_flags.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | UNAME26 3 | ADDR_NO_RANDOMIZE 4 | FDPIC_FUNCPTRS 5 | MMAP_PAGE_ZERO 6 | ADDR_COMPAT_LAYOUT 7 | READ_IMPLIES_EXEC 8 | ADDR_LIMIT_32BIT 9 | SHORT_INODE 10 | WHOLE_SECONDS 11 | STICKY_TIMEOUTS 12 | ADDR_LIMIT_3GB 13 | -------------------------------------------------------------------------------- /linux/tile/syscallent1.h: -------------------------------------------------------------------------------- 1 | #define sys_ARCH_mmap sys_mmap_4koff 2 | #define ARCH_WANT_SYNC_FILE_RANGE2 1 3 | #include "32/syscallent.h" 4 | [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, 5 | [245] = { 3, 0, SEN(printargs), "cacheflush" }, 6 | [246 ... 259] = { }, 7 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | childthread 2 | clone 3 | leaderkill 4 | many_looping_threads 5 | mmap_offset_decode 6 | mtd 7 | seccomp 8 | sfd 9 | sig 10 | sigkill_rain 11 | skodic 12 | threaded_execve 13 | ubi 14 | wait_must_be_interruptible 15 | x32_lseek 16 | x32_mmap 17 | -------------------------------------------------------------------------------- /tests/personality.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check personality syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -a20 -epersonality $args > "$OUT" 9 | match_grep "$LOG" "$OUT" 10 | rm -f "$OUT" 11 | 12 | exit 0 13 | -------------------------------------------------------------------------------- /tests/umount.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check umount syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | case "$STRACE_ARCH" in 8 | alpha) syscall=oldumount ;; 9 | *) syscall=umount ;; 10 | esac 11 | run_strace_match_diff -a24 -s6 -e trace=$syscall 12 | -------------------------------------------------------------------------------- /tests/umount2.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check umount2 syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | case "$STRACE_ARCH" in 8 | alpha|ia64) syscall=umount ;; 9 | *) syscall=umount2 ;; 10 | esac 11 | run_strace_match_diff -s7 -e trace=$syscall 12 | -------------------------------------------------------------------------------- /xlat/evdev_ff_types.in: -------------------------------------------------------------------------------- 1 | FF_RUMBLE 2 | FF_PERIODIC 3 | FF_CONSTANT 4 | FF_SPRING 5 | FF_FRICTION 6 | FF_DAMPER 7 | FF_INERTIA 8 | FF_RAMP 9 | FF_SQUARE 10 | FF_TRIANGLE 11 | FF_SINE 12 | FF_SAW_UP 13 | FF_SAW_DOWN 14 | FF_CUSTOM 15 | FF_GAIN 16 | FF_AUTOCENTER 17 | -------------------------------------------------------------------------------- /xlat/key_spec.in: -------------------------------------------------------------------------------- 1 | KEY_SPEC_THREAD_KEYRING -1 2 | KEY_SPEC_PROCESS_KEYRING -2 3 | KEY_SPEC_SESSION_KEYRING -3 4 | KEY_SPEC_USER_KEYRING -4 5 | KEY_SPEC_USER_SESSION_KEYRING -5 6 | KEY_SPEC_GROUP_KEYRING -6 7 | KEY_SPEC_REQKEY_AUTH_KEY -7 8 | KEY_SPEC_REQUESTOR_KEYRING -8 9 | -------------------------------------------------------------------------------- /linux/arc/syscallent.h: -------------------------------------------------------------------------------- 1 | #define sys_ARCH_mmap sys_mmap_pgoff 2 | #include "32/syscallent.h" 3 | [244] = { 3, 0, SEN(printargs), "arc_cacheflush"}, 4 | [245] = { 1, 0, SEN(printargs), "arc_settls" }, 5 | [246] = { 0, 0, SEN(printargs), "arc_gettls" }, 6 | [247 ... 259] = { }, 7 | -------------------------------------------------------------------------------- /linux/bfin/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(bfin_r0)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -bfin_r0; 7 | } else { 8 | tcp->u_rval = bfin_r0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/hppa/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(hppa_r28)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -hppa_r28; 7 | } else { 8 | tcp->u_rval = hppa_r28; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/m68k/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(m68k_d0)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -m68k_d0; 7 | } else { 8 | tcp->u_rval = m68k_d0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/powerpc/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (ppc_regs.ccr & 0x10000000) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = ppc_regs.gpr[3]; 7 | } else { 8 | tcp->u_rval = ppc_regs.gpr[3]; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/sh64/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(sh64_r9)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -sh64_r9; 7 | } else { 8 | tcp->u_rval = sh64_r9; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /xlat/adjtimex_status.in: -------------------------------------------------------------------------------- 1 | STA_PLL 2 | STA_PPSFREQ 3 | STA_PPSTIME 4 | STA_FLL 5 | STA_INS 6 | STA_DEL 7 | STA_UNSYNC 8 | STA_FREQHOLD 9 | STA_PPSSIGNAL 10 | STA_PPSJITTER 11 | STA_PPSWANDER 12 | STA_PPSERROR 13 | STA_CLOCKERR 14 | STA_NANO 15 | STA_MODE 16 | STA_CLK 17 | -------------------------------------------------------------------------------- /xlat/iffflags.in: -------------------------------------------------------------------------------- 1 | IFF_UP 2 | IFF_BROADCAST 3 | IFF_DEBUG 4 | IFF_LOOPBACK 5 | IFF_POINTOPOINT 6 | IFF_NOTRAILERS 7 | IFF_RUNNING 8 | IFF_NOARP 9 | IFF_PROMISC 10 | IFF_ALLMULTI 11 | IFF_MASTER 12 | IFF_SLAVE 13 | IFF_MULTICAST 14 | IFF_PORTSEL 15 | IFF_AUTOMEDIA 16 | -------------------------------------------------------------------------------- /linux/crisv10/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(cris_r10)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -cris_r10; 7 | } else { 8 | tcp->u_rval = cris_r10; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/xtensa/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(xtensa_a2)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -xtensa_a2; 7 | } else { 8 | tcp->u_rval = xtensa_a2; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/dumpio.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how dumpio works. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog ./unix-pair-send-recv abcdefghijklmnopqrstuvwxyz 8 | run_strace -esignal=none -esendto,recvfrom -eread=0 -ewrite=0 $args 9 | match_diff 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /tests/ipc_msgbuf.expected: -------------------------------------------------------------------------------- 1 | msgget\(IPC_PRIVATE, IPC_CREAT\|0700\) += [0-9]* 2 | msgsnd\([0-9]*, \{233811181, "STRACE_STRING\\0"\}, 14, 0\) += 0 3 | msgrcv\([0-9]*, \{233811181, "STRACE_STRING\\0"\}, 14, 233811181, 0\) += 14 4 | msgctl\([0-9]*, (IPC_64\|)?IPC_RMID, NULL\) += 0 5 | -------------------------------------------------------------------------------- /xlat/timerfdflags.in: -------------------------------------------------------------------------------- 1 | /* The Linux userspace headers didn't export these for a long time. */ 2 | 3 | TFD_TIMER_ABSTIME (1 << 0) 4 | TFD_TIMER_CANCEL_ON_SET (1 << 1) 5 | #if defined TFD_CLOEXEC || defined O_CLOEXEC 6 | TFD_CLOEXEC O_CLOEXEC 7 | #endif 8 | TFD_NONBLOCK O_NONBLOCK 9 | -------------------------------------------------------------------------------- /xlat/v4l2_control_classes.in: -------------------------------------------------------------------------------- 1 | V4L2_CTRL_CLASS_USER 2 | V4L2_CTRL_CLASS_MPEG 3 | V4L2_CTRL_CLASS_CAMERA 4 | V4L2_CTRL_CLASS_FM_TX 5 | V4L2_CTRL_CLASS_FLASH 6 | V4L2_CTRL_CLASS_JPEG 7 | V4L2_CTRL_CLASS_IMAGE_SOURCE 8 | V4L2_CTRL_CLASS_IMAGE_PROC 9 | V4L2_CTRL_CLASS_FM_RX 10 | -------------------------------------------------------------------------------- /tests/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . "${srcdir=.}/init.sh" 4 | 5 | $STRACE -V > /dev/null || 6 | framework_failure_ "$STRACE is not available" 7 | 8 | TIMEOUT="timeout -s 9 $TIMEOUT_DURATION" 9 | $TIMEOUT true > /dev/null 2>&1 || 10 | TIMEOUT= 11 | 12 | exec $TIMEOUT "$@" 13 | -------------------------------------------------------------------------------- /xlat/sysctl_net_ipv6.in: -------------------------------------------------------------------------------- 1 | NET_IPV6_CONF 2 | NET_IPV6_NEIGH 3 | NET_IPV6_ROUTE 4 | NET_IPV6_ICMP 5 | NET_IPV6_BINDV6ONLY 6 | NET_IPV6_IP6FRAG_HIGH_THRESH 7 | NET_IPV6_IP6FRAG_LOW_THRESH 8 | NET_IPV6_IP6FRAG_TIME 9 | NET_IPV6_IP6FRAG_SECRET_INTERVAL 10 | NET_IPV6_MLD_MAX_MSF 11 | -------------------------------------------------------------------------------- /xlat/v4l2_control_types.in: -------------------------------------------------------------------------------- 1 | V4L2_CTRL_TYPE_INTEGER 2 | V4L2_CTRL_TYPE_BOOLEAN 3 | V4L2_CTRL_TYPE_MENU 4 | V4L2_CTRL_TYPE_INTEGER_MENU 5 | V4L2_CTRL_TYPE_BITMASK 6 | V4L2_CTRL_TYPE_BUTTON 7 | V4L2_CTRL_TYPE_INTEGER64 8 | V4L2_CTRL_TYPE_STRING 9 | V4L2_CTRL_TYPE_CTRL_CLASS 10 | -------------------------------------------------------------------------------- /getcwd.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(getcwd) 4 | { 5 | if (exiting(tcp)) { 6 | if (syserror(tcp)) 7 | printaddr(tcp->u_arg[0]); 8 | else 9 | printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1); 10 | tprintf(", %lu", tcp->u_arg[1]); 11 | } 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /linux/i386/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(i386_regs.eax)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -i386_regs.eax; 7 | } else { 8 | tcp->u_rval = i386_regs.eax; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/uio.expected: -------------------------------------------------------------------------------- 1 | pread(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4 2 | preadv\(0, \[{"\\0\\0\\0\\0", 4}\], 1, 1004211379570065135\) += 4 3 | pwrite(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4 4 | pwritev\(0, \[{"\\0\\0\\0\\0", 4}\], 1, 1004211379570065135\) += 4 5 | -------------------------------------------------------------------------------- /xlat/fan_mark_flags.in: -------------------------------------------------------------------------------- 1 | FAN_MARK_ADD 0x00000001 2 | FAN_MARK_REMOVE 0x00000002 3 | FAN_MARK_DONT_FOLLOW 0x00000004 4 | FAN_MARK_ONLYDIR 0x00000008 5 | FAN_MARK_MOUNT 0x00000010 6 | FAN_MARK_IGNORED_MASK 0x00000020 7 | FAN_MARK_IGNORED_SURV_MODIFY 0x00000040 8 | FAN_MARK_FLUSH 0x00000080 9 | -------------------------------------------------------------------------------- /getcpu.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(getcpu) 4 | { 5 | if (exiting(tcp)) { 6 | printnum_int(tcp, tcp->u_arg[0], "%u"); 7 | tprints(", "); 8 | printnum_int(tcp, tcp->u_arg[1], "%u"); 9 | tprints(", "); 10 | printaddr(tcp->u_arg[2]); 11 | } 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /linux/arm/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(arm_regs.ARM_r0)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -arm_regs.ARM_r0; 7 | } else { 8 | tcp->u_rval = arm_regs.ARM_r0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/avr32/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(avr32_regs.r12)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -avr32_regs.r12; 7 | } else { 8 | tcp->u_rval = avr32_regs.r12; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/microblaze/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(microblaze_r3)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -microblaze_r3; 7 | } else { 8 | tcp->u_rval = microblaze_r3; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/s390/arch_regs.c: -------------------------------------------------------------------------------- 1 | /* PTRACE_GETREGSET on S390 is available since linux v2.6.27. */ 2 | static struct user_regs_struct s390_regset; 3 | unsigned long *const s390_frame_ptr = &s390_regset.gprs[15]; 4 | #define ARCH_REGS_FOR_GETREGSET s390_regset 5 | #define ARCH_PC_REG s390_regset.psw.addr 6 | -------------------------------------------------------------------------------- /linux/sparc/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (sparc_regs.psr & PSR_C) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = sparc_regs.u_regs[U_REG_O0]; 7 | } else { 8 | tcp->u_rval = sparc_regs.u_regs[U_REG_O0]; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/ppoll.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check ppoll syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog 8 | run_strace -a30 -s2 -e ppoll $args 9 | match_grep 10 | run_strace -a30 -v -s2 -e ppoll $args 11 | match_grep "$LOG" "$srcdir/$NAME-v.expected" 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /linux/or1k/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(or1k_regs.gpr[11])) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -or1k_regs.gpr[11]; 7 | } else { 8 | tcp->u_rval = or1k_regs.gpr[11]; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/sched_xetattr.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check sched_getattr and sched_setattr syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -e sched_getattr,sched_setattr $args > "$OUT" 9 | match_grep "$LOG" "$OUT" 10 | rm -f "$OUT" 11 | 12 | exit 0 13 | -------------------------------------------------------------------------------- /tests/statfs.expected: -------------------------------------------------------------------------------- 1 | statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type="PROC_SUPER_MAGIC", f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=[0-9]+)?\}\) += 0 2 | -------------------------------------------------------------------------------- /xlat/clocknames.in: -------------------------------------------------------------------------------- 1 | CLOCK_REALTIME 2 | CLOCK_MONOTONIC 3 | CLOCK_PROCESS_CPUTIME_ID 4 | CLOCK_THREAD_CPUTIME_ID 5 | CLOCK_MONOTONIC_RAW 6 | CLOCK_REALTIME_COARSE 7 | CLOCK_MONOTONIC_COARSE 8 | CLOCK_BOOTTIME 9 | CLOCK_REALTIME_ALARM 10 | CLOCK_BOOTTIME_ALARM 11 | CLOCK_SGI_CYCLE 12 | CLOCK_TAI 13 | -------------------------------------------------------------------------------- /linux/arc/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(arc_regs.scratch.r0)) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -arc_regs.scratch.r0; 7 | } else { 8 | tcp->u_rval = arc_regs.scratch.r0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/s390/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (check_errno && is_negated_errno(s390_regset.gprs[2])) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = -s390_regset.gprs[2]; 7 | } else { 8 | tcp->u_rval = s390_regset.gprs[2]; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /linux/sparc64/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (sparc_regs.tstate & 0x1100000000UL) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = sparc_regs.u_regs[U_REG_O0]; 7 | } else { 8 | tcp->u_rval = sparc_regs.u_regs[U_REG_O0]; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /xlat/getsockipv6options.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Options specific to getsockopt(SOL_IPV6). 3 | * Common {g,s}etsockopt(SOL_IPV6) options 4 | * should be in sockipv6options.in instead. 5 | */ 6 | 7 | IP6T_SO_GET_INFO 8 | IP6T_SO_GET_ENTRIES 9 | IP6T_SO_GET_REVISION_MATCH 10 | IP6T_SO_GET_REVISION_TARGET 11 | -------------------------------------------------------------------------------- /xlat/secbits.in: -------------------------------------------------------------------------------- 1 | SECBIT_NOROOT (1 << 0) 2 | SECBIT_NOROOT_LOCKED (1 << 1) 3 | SECBIT_NO_SETUID_FIXUP (1 << 2) 4 | SECBIT_NO_SETUID_FIXUP_LOCKED (1 << 3) 5 | SECBIT_KEEP_CAPS (1 << 4) 6 | SECBIT_KEEP_CAPS_LOCKED (1 << 5) 7 | SECBIT_NO_CAP_AMBIENT_RAISE (1 << 6) 8 | SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED (1 << 7) 9 | -------------------------------------------------------------------------------- /linux/arc/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | long *arc_args = &arc_regs.scratch.r0; 6 | unsigned int i; 7 | 8 | for (i = 0; i < MAX_ARGS; ++i) 9 | tcp->u_arg[i] = *arc_args--; 10 | return 1; 11 | } 12 | -------------------------------------------------------------------------------- /linux/s390/userent1.h: -------------------------------------------------------------------------------- 1 | XLAT_UOFF(u_tsize), 2 | XLAT_UOFF(u_dsize), 3 | XLAT_UOFF(u_ssize), 4 | XLAT_UOFF(start_code), 5 | /* S390[X] has no start_data */ 6 | XLAT_UOFF(start_stack), 7 | XLAT_UOFF(signal), 8 | XLAT_UOFF(u_ar0), 9 | XLAT_UOFF(magic), 10 | XLAT_UOFF(u_comm), 11 | #include "../userent0.h" 12 | -------------------------------------------------------------------------------- /linux/sparc/arch_regs.h: -------------------------------------------------------------------------------- 1 | extern struct pt_regs sparc_regs; 2 | /* Indexes into the pt_regs.u_reg[] array -- UREG_XX from kernel are all off 3 | * by 1 and use Ix instead of Ox. These work for both 32 and 64 bit Linux. */ 4 | #define U_REG_G1 0 5 | #define U_REG_O0 7 6 | #define U_REG_O1 8 7 | #define U_REG_FP 13 8 | -------------------------------------------------------------------------------- /tests/pipe.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check pipe/pipe2 syscalls decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | syscall=pipe2 8 | for n in pipe; do 9 | $STRACE -e$n -h > /dev/null && syscall=$syscall,$n 10 | done 11 | 12 | run_prog 13 | run_strace -e$syscall $args 14 | match_grep 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /linux/ia64/arch_regs.c: -------------------------------------------------------------------------------- 1 | static struct pt_all_user_regs ia64_regs; 2 | unsigned long *const ia64_frame_ptr = &ia64_regs.gr[12]; 3 | 4 | #define IA64_PSR_IS ((long)1 << 34) 5 | #define ia64_ia32mode (ia64_regs.cr_ipsr & IA64_PSR_IS) 6 | 7 | #define ARCH_REGS_FOR_GETREGS ia64_regs 8 | #define ARCH_PC_REG ia64_regs.br[0] 9 | -------------------------------------------------------------------------------- /tests/umovestr.expected: -------------------------------------------------------------------------------- 1 | chdir("////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////") = 0 2 | +++ exited with 0 +++ 3 | -------------------------------------------------------------------------------- /xlat/fan_event_flags.in: -------------------------------------------------------------------------------- 1 | FAN_ACCESS 0x00000001 2 | FAN_MODIFY 0x00000002 3 | FAN_CLOSE_WRITE 0x00000008 4 | FAN_CLOSE_NOWRITE 0x00000010 5 | FAN_OPEN 0x00000020 6 | FAN_Q_OVERFLOW 0x00004000 7 | FAN_OPEN_PERM 0x00010000 8 | FAN_ACCESS_PERM 0x00020000 9 | FAN_ONDIR 0x40000000 10 | FAN_EVENT_ON_CHILD 0x08000000 11 | -------------------------------------------------------------------------------- /xlat/sysctl_net.in: -------------------------------------------------------------------------------- 1 | NET_CORE 2 | NET_ETHER 3 | NET_802 4 | NET_UNIX 5 | NET_IPV4 6 | NET_IPX 7 | NET_ATALK 8 | NET_NETROM 9 | NET_AX25 10 | NET_BRIDGE 11 | NET_ROSE 12 | NET_IPV6 13 | NET_X25 14 | NET_TR 15 | NET_DECNET 16 | NET_ECONET 17 | NET_SCTP 18 | NET_LLC 19 | NET_NETFILTER 20 | NET_DCCP 21 | NET_IRDA 22 | -------------------------------------------------------------------------------- /linux/alpha/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | unsigned int i; 6 | 7 | for (i = 0; i < tcp->s_ent->nargs; ++i) 8 | if (upeek(tcp->pid, REG_A0+i, &tcp->u_arg[i]) < 0) 9 | return -1; 10 | return 1; 11 | } 12 | -------------------------------------------------------------------------------- /linux/hppa/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | unsigned int i; 6 | 7 | for (i = 0; i < tcp->s_ent->nargs; ++i) 8 | if (upeek(tcp->pid, PT_GR26-4*i, &tcp->u_arg[i]) < 0) 9 | return -1; 10 | return 1; 11 | } 12 | -------------------------------------------------------------------------------- /xlat/resources.in: -------------------------------------------------------------------------------- 1 | RLIMIT_AS 2 | RLIMIT_CORE 3 | RLIMIT_CPU 4 | RLIMIT_DATA 5 | RLIMIT_FSIZE 6 | RLIMIT_LOCKS 7 | RLIMIT_MEMLOCK 8 | RLIMIT_MSGQUEUE 9 | RLIMIT_NICE 10 | RLIMIT_NOFILE 11 | RLIMIT_NPROC 12 | RLIMIT_RSS 13 | RLIMIT_RTPRIO 14 | RLIMIT_RTTIME 15 | RLIMIT_SIGPENDING 16 | RLIMIT_STACK 17 | RLIMIT_VMEM 18 | -------------------------------------------------------------------------------- /linux/metag/syscallent.h: -------------------------------------------------------------------------------- 1 | #include "32/syscallent.h" 2 | [244] = { }, 3 | [245] = { 2, 0, SEN(printargs), "metag_setglobalbit" }, 4 | [246] = { 1, 0, SEN(printargs), "metag_set_fpu_flags" }, 5 | [247] = { 1, 0, SEN(printargs), "metag_set_tls" }, 6 | [248] = { 0, NF, SEN(printargs), "metag_get_tls" }, 7 | [249 ... 259] = { }, 8 | -------------------------------------------------------------------------------- /linux/microblaze/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | unsigned int i; 6 | 7 | for (i = 0; i < tcp->s_ent->nargs; ++i) 8 | if (upeek(tcp->pid, (5 + i) * 4, &tcp->u_arg[i]) < 0) 9 | return -1; 10 | return 1; 11 | } 12 | -------------------------------------------------------------------------------- /tests/ioctl.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check ioctl syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -a16 -eioctl $args > "$EXP" 9 | check_prog grep 10 | grep -v '^ioctl([012],' < "$LOG" > "$OUT" 11 | match_diff "$OUT" "$EXP" 12 | 13 | rm -f "$EXP" "$OUT" 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /tests/llseek.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check _llseek syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | check_prog grep 8 | run_prog > /dev/null 9 | run_strace -e_llseek $args > "$EXP" 10 | grep -v '^lseek([0-9]' < "$LOG" > "$OUT" 11 | match_diff "$OUT" "$EXP" 12 | 13 | rm -f "$EXP" "$OUT" 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /tests/lseek.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check lseek syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | check_prog grep 8 | run_prog > /dev/null 9 | run_strace -a30 -elseek $args > "$EXP" 10 | grep -v '^lseek([0-9]' < "$LOG" > "$OUT" 11 | match_diff "$OUT" "$EXP" 12 | 13 | rm -f "$EXP" "$OUT" 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /tests/memfd_create.c: -------------------------------------------------------------------------------- 1 | #include "tests.h" 2 | #include 3 | #include 4 | 5 | #ifdef __NR_memfd_create 6 | 7 | int 8 | main(void) 9 | { 10 | syscall(__NR_memfd_create, "strace", 7); 11 | return 0; 12 | } 13 | 14 | #else 15 | 16 | SKIP_MAIN_UNDEFINED("__NR_memfd_create") 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /tests/restart_syscall.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how "resuming interrupted nanosleep" works. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | syscalls=nanosleep,restart_syscall 9 | run_strace -a20 -e trace=$syscalls $args > "$OUT" 10 | match_grep "$LOG" "$OUT" 11 | rm -f "$OUT" 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /tests/umovestr2.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # umovestr short read regression test 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -veexecve -s262144 $args > "$EXP" 9 | check_prog sed 10 | sed 1d < "$LOG" > "$OUT" 11 | match_diff "$OUT" "$EXP" 12 | 13 | rm -f "$EXP" "$OUT" 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /xlat/ptrace_setoptions_flags.in: -------------------------------------------------------------------------------- 1 | PTRACE_O_TRACESYSGOOD 2 | PTRACE_O_TRACEFORK 3 | PTRACE_O_TRACEVFORK 4 | PTRACE_O_TRACECLONE 5 | PTRACE_O_TRACEEXEC 6 | PTRACE_O_TRACEVFORKDONE 7 | PTRACE_O_TRACEEXIT 8 | PTRACE_O_TRACESECCOMP 9 | PTRACE_O_EXITKILL 10 | PTRACE_O_SUSPEND_SECCOMP 11 | /* tile */ 12 | PTRACE_O_TRACEMIGRATE 13 | -------------------------------------------------------------------------------- /fchownat.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(fchownat) 4 | { 5 | print_dirfd(tcp, tcp->u_arg[0]); 6 | printpath(tcp, tcp->u_arg[1]); 7 | printuid(", ", tcp->u_arg[2]); 8 | printuid(", ", tcp->u_arg[3]); 9 | tprints(", "); 10 | printflags(at_flags, tcp->u_arg[4], "AT_???"); 11 | 12 | return RVAL_DECODED; 13 | } 14 | -------------------------------------------------------------------------------- /linux/alpha/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | static void 2 | arch_sigreturn(struct tcb *tcp) 3 | { 4 | long addr; 5 | 6 | if (upeek(tcp->pid, REG_FP, &addr) < 0) 7 | return; 8 | addr += offsetof(struct sigcontext, sc_mask); 9 | 10 | tprints("{mask="); 11 | print_sigset_addr_len(tcp, addr, NSIG / 8); 12 | tprints("}"); 13 | } 14 | -------------------------------------------------------------------------------- /linux/m68k/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | unsigned int i; 6 | 7 | for (i = 0; i < tcp->s_ent->nargs; ++i) 8 | if (upeek(tcp->pid, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0) 9 | return -1; 10 | return 1; 11 | } 12 | -------------------------------------------------------------------------------- /xlat/bootflags3.in: -------------------------------------------------------------------------------- 1 | LINUX_REBOOT_CMD_RESTART 0x01234567 2 | LINUX_REBOOT_CMD_HALT 0xCDEF0123 3 | LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF 4 | LINUX_REBOOT_CMD_CAD_OFF 0x00000000 5 | LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC 6 | LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 7 | LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2 8 | LINUX_REBOOT_CMD_KEXEC 0x45584543 9 | -------------------------------------------------------------------------------- /xlat/msg_flags.in: -------------------------------------------------------------------------------- 1 | MSG_OOB 2 | MSG_PEEK 3 | MSG_DONTROUTE 4 | MSG_CTRUNC 5 | MSG_PROBE 6 | MSG_TRUNC 7 | MSG_DONTWAIT 8 | MSG_EOR 9 | MSG_WAITALL 10 | MSG_FIN 11 | MSG_SYN 12 | MSG_CONFIRM 13 | MSG_RST 14 | MSG_ERRQUEUE 15 | MSG_NOSIGNAL 16 | MSG_MORE 17 | MSG_WAITFORONE 18 | MSG_EOF 19 | MSG_FASTOPEN 20 | MSG_CMSG_CLOEXEC 21 | -------------------------------------------------------------------------------- /qemu_multiarch_testing/hdc.dir/init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Emit a msg to let user know this place was reached 4 | echo "Copying to /home" 5 | # Had a case where cp SEGVs, let's have diagnostics for it 6 | cp -a /mnt /home || { echo "cp: $?"; exit 1; } 7 | cd /home/mnt || exit $? 8 | exec ./init2 9 | echo "Failed to exec ./init2" 10 | -------------------------------------------------------------------------------- /tests/sigaltstack.c: -------------------------------------------------------------------------------- 1 | #include "tests.h" 2 | #include 3 | 4 | int 5 | main(void) 6 | { 7 | stack_t ss = { 8 | .ss_sp = (void *) 0xbaadf00d, 9 | .ss_flags = SS_DISABLE, 10 | .ss_size = 0xdeadbeef 11 | }; 12 | if (sigaltstack(&ss, (stack_t *) 0)) 13 | perror_msg_and_skip("sigaltstack"); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /xlat/icmpfilterflags.in: -------------------------------------------------------------------------------- 1 | 1<u_arg[0]); 11 | tabto(); 12 | tprints("= ?\n"); 13 | line_ended(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /tests/times-fail.c: -------------------------------------------------------------------------------- 1 | #include "tests.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int 8 | main (void) 9 | { 10 | assert(syscall(__NR_times, 0x42) == -1); 11 | printf("times(0x42) = -1 EFAULT (%m)\n"); 12 | puts("+++ exited with 0 +++"); 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /tests/dup.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int 6 | main(void) 7 | { 8 | const int fd = -1; 9 | int rc = dup(fd); 10 | printf("dup(%d) = %d %s (%m)\n", 11 | fd, rc, 12 | errno == ENOSYS ? "ENOSYS" : "EBADF"); 13 | 14 | puts("+++ exited with 0 +++"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /xlat/evdev_mtslots.in: -------------------------------------------------------------------------------- 1 | ABS_MT_SLOT 2 | ABS_MT_TOUCH_MAJOR 3 | ABS_MT_TOUCH_MINOR 4 | ABS_MT_WIDTH_MAJOR 5 | ABS_MT_WIDTH_MINOR 6 | ABS_MT_ORIENTATION 7 | ABS_MT_POSITION_X 8 | ABS_MT_POSITION_Y 9 | ABS_MT_TOOL_TYPE 10 | ABS_MT_BLOB_ID 11 | ABS_MT_TRACKING_ID 12 | ABS_MT_PRESSURE 13 | ABS_MT_DISTANCE 14 | ABS_MT_TOOL_X 15 | ABS_MT_TOOL_Y 16 | -------------------------------------------------------------------------------- /xlat/sysctl_net_ipv6_route.in: -------------------------------------------------------------------------------- 1 | NET_IPV6_ROUTE_FLUSH 2 | NET_IPV6_ROUTE_GC_THRESH 3 | NET_IPV6_ROUTE_MAX_SIZE 4 | NET_IPV6_ROUTE_GC_MIN_INTERVAL 5 | NET_IPV6_ROUTE_GC_TIMEOUT 6 | NET_IPV6_ROUTE_GC_INTERVAL 7 | NET_IPV6_ROUTE_GC_ELASTICITY 8 | NET_IPV6_ROUTE_MTU_EXPIRES 9 | NET_IPV6_ROUTE_MIN_ADVMSS 10 | NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS 11 | -------------------------------------------------------------------------------- /linux/metag/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | /* result pointer in D0Re0 (D0.0) */ 5 | if (check_errno && is_negated_errno(metag_regs.dx[0][0])) { 6 | tcp->u_rval = -1; 7 | tcp->u_error = -metag_regs.dx[0][0]; 8 | } else { 9 | tcp->u_rval = metag_regs.dx[0][0]; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /linux/sh/userent0.h: -------------------------------------------------------------------------------- 1 | XLAT_UOFF(u_fpvalid), 2 | XLAT_UOFF(u_tsize), 3 | XLAT_UOFF(u_dsize), 4 | XLAT_UOFF(u_ssize), 5 | XLAT_UOFF(start_code), 6 | XLAT_UOFF(start_data), 7 | XLAT_UOFF(start_stack), 8 | XLAT_UOFF(signal), 9 | XLAT_UOFF(u_ar0), 10 | XLAT_UOFF(u_fpstate), 11 | XLAT_UOFF(magic), 12 | XLAT_UOFF(u_comm), 13 | #include "../userent0.h" 14 | -------------------------------------------------------------------------------- /test/sig.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void interrupt() 6 | { 7 | write(2, "xyzzy\n", 6); 8 | } 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | char buf[1024]; 13 | 14 | signal(SIGINT, interrupt); 15 | read(0, buf, 1024); 16 | write(2, "qwerty\n", 7); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /tests/mq.expected: -------------------------------------------------------------------------------- 1 | mq_open\("strace-mq.test", O_RDONLY\|O_CREAT, 0700, NULL\) += 0 2 | mq_getsetattr\(0, NULL, \{mq_flags=O_RDONLY, mq_maxmsg=[1-9][0-9]*, mq_msgsize=[1-9][0-9]*, mq_curmsg=0\}\) += 0 3 | mq_getsetattr\(0, \{mq_flags=O_RDONLY, mq_maxmsg=[1-9][0-9]*, mq_msgsize=[1-9][0-9]*, mq_curmsg=0\}, NULL\) += 0 4 | mq_unlink\("strace-mq.test"\) += 0 5 | -------------------------------------------------------------------------------- /tests/statfs.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how statfs/statfs64 syscalls are traced. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | # this test probes /proc/self/status 8 | [ -f /proc/self/status ] || 9 | framework_skip_ '/proc/self/status is not available' 10 | 11 | run_prog 12 | run_strace -efile $args 13 | match_grep 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /tests/execve.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check execve syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | check_prog grep 8 | run_prog > /dev/null 9 | run_strace -eexecve $args > "$EXP" 10 | 11 | # Filter out execve() call made by strace. 12 | grep -F test.execve < "$LOG" > "$OUT" 13 | match_diff "$OUT" "$EXP" 14 | 15 | rm -f "$EXP" "$OUT" 16 | -------------------------------------------------------------------------------- /xlat/atomic_ops.in: -------------------------------------------------------------------------------- 1 | { OR1K_ATOMIC_SWAP, "SWAP" }, 2 | { OR1K_ATOMIC_CMPXCHG, "CMPXCHG" }, 3 | { OR1K_ATOMIC_XCHG, "XCHG" }, 4 | { OR1K_ATOMIC_ADD, "ADD" }, 5 | { OR1K_ATOMIC_DECPOS, "DECPOS" }, 6 | { OR1K_ATOMIC_AND, "AND" }, 7 | { OR1K_ATOMIC_OR, "OR" }, 8 | { OR1K_ATOMIC_UMAX, "UMAX" }, 9 | { OR1K_ATOMIC_UMIN, "UMIN" }, 10 | -------------------------------------------------------------------------------- /xlat/evdev_switch.in: -------------------------------------------------------------------------------- 1 | SW_LID 2 | SW_TABLET_MODE 3 | SW_HEADPHONE_INSERT 4 | SW_RFKILL_ALL 5 | SW_RADIO 6 | SW_MICROPHONE_INSERT 7 | SW_DOCK 8 | SW_LINEOUT_INSERT 9 | SW_JACK_PHYSICAL_INSERT 10 | SW_VIDEOOUT_INSERT 11 | SW_CAMERA_LENS_COVER 12 | SW_KEYPAD_SLIDE 13 | SW_FRONT_PROXIMITY 14 | SW_ROTATE_LOCK 15 | SW_LINEIN_INSERT 16 | SW_MUTE_DEVICE 17 | -------------------------------------------------------------------------------- /xlat/key_reqkeys.in: -------------------------------------------------------------------------------- 1 | KEY_REQKEY_DEFL_NO_CHANGE -1 2 | KEY_REQKEY_DEFL_DEFAULT 0 3 | KEY_REQKEY_DEFL_THREAD_KEYRING 1 4 | KEY_REQKEY_DEFL_PROCESS_KEYRING 2 5 | KEY_REQKEY_DEFL_SESSION_KEYRING 3 6 | KEY_REQKEY_DEFL_USER_KEYRING 4 7 | KEY_REQKEY_DEFL_USER_SESSION_KEYRING 5 8 | KEY_REQKEY_DEFL_GROUP_KEYRING 6 9 | KEY_REQKEY_DEFL_REQUESTOR_KEYRING 7 10 | -------------------------------------------------------------------------------- /xlat/syslog_action_type.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | SYSLOG_ACTION_CLOSE 3 | SYSLOG_ACTION_OPEN 4 | SYSLOG_ACTION_READ 5 | SYSLOG_ACTION_READ_ALL 6 | SYSLOG_ACTION_READ_CLEAR 7 | SYSLOG_ACTION_CLEAR 8 | SYSLOG_ACTION_CONSOLE_OFF 9 | SYSLOG_ACTION_CONSOLE_ON 10 | SYSLOG_ACTION_CONSOLE_LEVEL 11 | SYSLOG_ACTION_SIZE_UNREAD 12 | SYSLOG_ACTION_SIZE_BUFFER 13 | -------------------------------------------------------------------------------- /tests/sun_path.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how long sun_path addresses are traced. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog ./net-accept-connect 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 8 | run_strace_merge -ebind,connect,getsockname $args 9 | match_grep 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /linux/metag/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | unsigned int i; 6 | 7 | for (i = 0; i < MAX_ARGS; i++) { 8 | /* arguments go backwards from D1Ar1 (D1.3) */ 9 | tcp->u_arg[i] = ((unsigned long *)&metag_regs.dx[3][1])[-i]; 10 | } 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /linux/s390/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | static void 2 | arch_sigreturn(struct tcb *tcp) 3 | { 4 | long mask[NSIG / 8 / sizeof(long)]; 5 | const long addr = *s390_frame_ptr + __SIGNAL_FRAMESIZE; 6 | 7 | if (umove(tcp, addr, &mask) < 0) { 8 | tprintf("{mask=%#lx}", addr); 9 | } else { 10 | tprintsigmask_addr("{mask=", mask); 11 | tprints("}"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | # Map git author names and email addresses to canonical/preferred form. 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /linux/mips/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (mips_REG_A3) { 5 | tcp->u_rval = -1; 6 | tcp->u_error = mips_REG_V0; 7 | } else { 8 | tcp->u_rval = mips_REG_V0; 9 | #ifdef LINUX_MIPSN32 10 | /* tcp->u_rval contains a truncated value */ 11 | tcp->u_lrval = mips_REG_V0; 12 | #endif 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/execve-v.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check verbose decoding of execve syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | check_prog grep 8 | run_prog > /dev/null 9 | run_strace -veexecve $args > "$EXP" 10 | 11 | # Filter out execve() call made by strace. 12 | grep -F test.execve < "$LOG" > "$OUT" 13 | match_diff "$OUT" "$EXP" 14 | 15 | rm -f "$EXP" "$OUT" 16 | -------------------------------------------------------------------------------- /xlat/v4l2_buf_types.in: -------------------------------------------------------------------------------- 1 | V4L2_BUF_TYPE_VIDEO_CAPTURE 2 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 3 | V4L2_BUF_TYPE_VIDEO_OUTPUT 4 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE 5 | V4L2_BUF_TYPE_VIDEO_OVERLAY 6 | V4L2_BUF_TYPE_VBI_CAPTURE 7 | V4L2_BUF_TYPE_VBI_OUTPUT 8 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE 9 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT 10 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY 11 | -------------------------------------------------------------------------------- /linux/mips/genstub.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | srcdir="${0%/*}" 4 | dstdir="$1"; shift 5 | 6 | for n in n32 n64 o32; do 7 | in="$srcdir/syscallent-$n.h" 8 | out="$dstdir/syscallent-$n-stub.h" 9 | sed -n '/^#if/,/^#else/ {s/^\([^{]*{[^,]*,[^,]*,[[:space:]]*\)[^,[:space:]]\+,[[:space:]]*"\([^"]\+".*\)/\1SEN(printargs), "'$n'_\2/; s/^\[.*/&/p}' < "$in" > "$out" 10 | done 11 | -------------------------------------------------------------------------------- /getrandom.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | #include "xlat/getrandom_flags.h" 3 | 4 | SYS_FUNC(getrandom) 5 | { 6 | if (exiting(tcp)) { 7 | if (syserror(tcp)) 8 | printaddr(tcp->u_arg[0]); 9 | else 10 | printstr(tcp, tcp->u_arg[0], tcp->u_rval); 11 | tprintf(", %lu, ", tcp->u_arg[1]); 12 | printflags(getrandom_flags, tcp->u_arg[2], "GRND_???"); 13 | } 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /linux/i386/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = i386_regs.ebx; 6 | tcp->u_arg[1] = i386_regs.ecx; 7 | tcp->u_arg[2] = i386_regs.edx; 8 | tcp->u_arg[3] = i386_regs.esi; 9 | tcp->u_arg[4] = i386_regs.edi; 10 | tcp->u_arg[5] = i386_regs.ebp; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /linux/i386/userent.h: -------------------------------------------------------------------------------- 1 | XLAT(4*EBX), 2 | XLAT(4*ECX), 3 | XLAT(4*EDX), 4 | XLAT(4*ESI), 5 | XLAT(4*EDI), 6 | XLAT(4*EBP), 7 | XLAT(4*EAX), 8 | XLAT(4*DS), 9 | XLAT(4*ES), 10 | XLAT(4*FS), 11 | XLAT(4*GS), 12 | XLAT(4*ORIG_EAX), 13 | XLAT(4*EIP), 14 | XLAT(4*CS), 15 | XLAT(4*EFL), 16 | XLAT(4*UESP), 17 | XLAT(4*SS), 18 | /* Other fields in "struct user" */ 19 | #include "userent0.h" 20 | -------------------------------------------------------------------------------- /sram_alloc.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | #ifdef BFIN 4 | 5 | #include 6 | 7 | #include "xlat/sram_alloc_flags.h" 8 | 9 | SYS_FUNC(sram_alloc) 10 | { 11 | /* size */ 12 | tprintf("%lu, ", tcp->u_arg[0]); 13 | /* flags */ 14 | printflags(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); 15 | 16 | return RVAL_DECODED | RVAL_HEX; 17 | } 18 | 19 | #endif /* BFIN */ 20 | -------------------------------------------------------------------------------- /linux/avr32/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = avr32_regs.r12; 6 | tcp->u_arg[1] = avr32_regs.r11; 7 | tcp->u_arg[2] = avr32_regs.r10; 8 | tcp->u_arg[3] = avr32_regs.r9; 9 | tcp->u_arg[4] = avr32_regs.r5; 10 | tcp->u_arg[5] = avr32_regs.r3; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /tests/fanotify_mark.c: -------------------------------------------------------------------------------- 1 | #include "tests.h" 2 | 3 | #if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK 4 | 5 | # include 6 | 7 | int 8 | main(void) 9 | { 10 | fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, -100, "."); 11 | return 0; 12 | } 13 | 14 | #else 15 | 16 | SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK") 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /xlat/personality_types.in: -------------------------------------------------------------------------------- 1 | #unconditional 2 | PER_LINUX 3 | PER_LINUX_32BIT 4 | PER_LINUX_FDPIC 5 | PER_SVR4 6 | PER_SVR3 7 | PER_SCOSVR3 8 | PER_OSR5 9 | PER_WYSEV386 10 | PER_ISCR4 11 | PER_BSD 12 | PER_SUNOS 13 | PER_XENIX 14 | PER_LINUX32 15 | PER_LINUX32_3GB 16 | PER_IRIX32 17 | PER_IRIXN32 18 | PER_IRIX64 19 | PER_RISCOS 20 | PER_SOLARIS 21 | PER_UW7 22 | PER_OSF4 23 | PER_HPUX 24 | -------------------------------------------------------------------------------- /linux/i386/userent0.h: -------------------------------------------------------------------------------- 1 | XLAT_UOFF(u_fpvalid), 2 | XLAT_UOFF(i387), 3 | XLAT_UOFF(u_tsize), 4 | XLAT_UOFF(u_dsize), 5 | XLAT_UOFF(u_ssize), 6 | XLAT_UOFF(start_code), 7 | XLAT_UOFF(start_stack), 8 | XLAT_UOFF(signal), 9 | XLAT_UOFF(reserved), 10 | XLAT_UOFF(u_ar0), 11 | XLAT_UOFF(u_fpstate), 12 | XLAT_UOFF(magic), 13 | XLAT_UOFF(u_comm), 14 | XLAT_UOFF(u_debugreg), 15 | #include "../userent0.h" 16 | -------------------------------------------------------------------------------- /qemu_multiarch_testing/hdc.dir/init2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | umount /mnt # optional 4 | ( 5 | set -e -x 6 | cd strace 7 | ./configure 8 | make 9 | size strace 10 | make check VERBOSE=1 && 11 | cat tests/test-suite.log ||: 12 | test "x$FTP_PORT" = x || 13 | ftpput -P "$FTP_PORT" "$FTP_SERVER" strace 14 | ) 2>&1 | tee strace_build.log 15 | mount -o remount,ro /home 16 | sync 17 | sleep 1 18 | -------------------------------------------------------------------------------- /xlat/baud_options.in: -------------------------------------------------------------------------------- 1 | B0 2 | B50 3 | B75 4 | B110 5 | B134 6 | B150 7 | B200 8 | B300 9 | B600 10 | B1200 11 | B1800 12 | B2400 13 | B4800 14 | B9600 15 | B19200 16 | B38400 17 | B57600 18 | B115200 19 | B230400 20 | B460800 21 | B500000 22 | B576000 23 | B921600 24 | B1000000 25 | B1152000 26 | B1500000 27 | B2000000 28 | B2500000 29 | B3000000 30 | B3500000 31 | B4000000 32 | EXTA 33 | EXTB 34 | -------------------------------------------------------------------------------- /xlat/nt_descriptor_types.in: -------------------------------------------------------------------------------- 1 | NT_PRSTATUS 2 | NT_FPREGSET 3 | NT_PRPSINFO 4 | NT_PRXREG 5 | NT_TASKSTRUCT 6 | NT_PLATFORM 7 | NT_AUXV 8 | NT_GWINDOWS 9 | NT_ASRS 10 | NT_PSTATUS 11 | NT_PSINFO 12 | NT_PRCRED 13 | NT_UTSNAME 14 | NT_LWPSTATUS 15 | NT_LWPSINFO 16 | NT_PRFPXREG 17 | NT_PRXFPREG 18 | NT_PPC_VMX 19 | NT_PPC_SPE 20 | NT_PPC_VSX 21 | NT_386_TLS 22 | NT_386_IOPERM 23 | NT_X86_XSTATE 24 | -------------------------------------------------------------------------------- /xlat/openmodessol.in: -------------------------------------------------------------------------------- 1 | { 0, "O_RDWR" }, 2 | { 1, "O_RDONLY" }, 3 | { 2, "O_WRONLY" }, 4 | { 0x80, "O_NONBLOCK" }, 5 | { 8, "O_APPEND" }, 6 | { 0x100, "O_CREAT" }, 7 | { 0x200, "O_TRUNC" }, 8 | { 0x400, "O_EXCL" }, 9 | { 0x800, "O_NOCTTY" }, 10 | { 0x10, "O_SYNC" }, 11 | { 0x40, "O_DSYNC" }, 12 | { 0x8000, "O_RSYNC" }, 13 | { 4, "O_NDELAY" }, 14 | { 0x1000, "O_PRIV" }, 15 | -------------------------------------------------------------------------------- /xlat/pr_set_mm.in: -------------------------------------------------------------------------------- 1 | PR_SET_MM_START_CODE 1 2 | PR_SET_MM_END_CODE 2 3 | PR_SET_MM_START_DATA 3 4 | PR_SET_MM_END_DATA 4 5 | PR_SET_MM_START_STACK 5 6 | PR_SET_MM_START_BRK 6 7 | PR_SET_MM_BRK 7 8 | PR_SET_MM_ARG_START 8 9 | PR_SET_MM_ARG_END 9 10 | PR_SET_MM_ENV_START 10 11 | PR_SET_MM_ENV_END 11 12 | PR_SET_MM_AUXV 12 13 | PR_SET_MM_EXE_FILE 13 14 | PR_SET_MM_MAP 14 15 | PR_SET_MM_MAP_SIZE 15 16 | -------------------------------------------------------------------------------- /linux/powerpc/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = ppc_regs.orig_gpr3; 6 | tcp->u_arg[1] = ppc_regs.gpr[4]; 7 | tcp->u_arg[2] = ppc_regs.gpr[5]; 8 | tcp->u_arg[3] = ppc_regs.gpr[6]; 9 | tcp->u_arg[4] = ppc_regs.gpr[7]; 10 | tcp->u_arg[5] = ppc_regs.gpr[8]; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /linux/arm/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = arm_regs.uregs[0]; 6 | tcp->u_arg[1] = arm_regs.uregs[1]; 7 | tcp->u_arg[2] = arm_regs.uregs[2]; 8 | tcp->u_arg[3] = arm_regs.uregs[3]; 9 | tcp->u_arg[4] = arm_regs.uregs[4]; 10 | tcp->u_arg[5] = arm_regs.uregs[5]; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /linux/ia64/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | static void 2 | arch_sigreturn(struct tcb *tcp) 3 | { 4 | /* offsetof(struct sigframe, sc) */ 5 | #define OFFSETOF_STRUCT_SIGFRAME_SC 0xA0 6 | const long addr = *ia64_frame_ptr + 16 + 7 | OFFSETOF_STRUCT_SIGFRAME_SC + 8 | offsetof(struct sigcontext, sc_mask); 9 | tprints("{mask="); 10 | print_sigset_addr_len(tcp, addr, NSIG / 8); 11 | tprints("}"); 12 | } 13 | -------------------------------------------------------------------------------- /tests/uname.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check uname syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | check_prog uniq 8 | 9 | run_prog > /dev/null 10 | run_strace -v -euname $args > "$EXP" 11 | uniq < "$LOG" > "$OUT" 12 | 13 | run_prog "./$NAME" abbrev > /dev/null 14 | run_strace -euname $args >> "$EXP" 15 | uniq < "$LOG" >> "$OUT" 16 | 17 | match_diff "$OUT" "$EXP" 18 | rm -f "$OUT" "$EXP" 19 | -------------------------------------------------------------------------------- /linux/bfin/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | static const int argreg[MAX_ARGS] = 6 | { PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5 }; 7 | unsigned int i; 8 | 9 | for (i = 0; i < tcp->s_ent->nargs; ++i) 10 | if (upeek(tcp->pid, argreg[i], &tcp->u_arg[i]) < 0) 11 | return -1; 12 | return 1; 13 | } 14 | -------------------------------------------------------------------------------- /linux/tile/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = tile_regs.regs[0]; 6 | tcp->u_arg[1] = tile_regs.regs[1]; 7 | tcp->u_arg[2] = tile_regs.regs[2]; 8 | tcp->u_arg[3] = tile_regs.regs[3]; 9 | tcp->u_arg[4] = tile_regs.regs[4]; 10 | tcp->u_arg[5] = tile_regs.regs[5]; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /tests/poll.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check poll syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -a18 -vepoll $args > "$OUT" 9 | match_diff "$LOG" "$OUT" 10 | 11 | for abbrev in 0 1 2 3 4 5; do 12 | run_prog "./$NAME" $abbrev > /dev/null 13 | run_strace -a18 -epoll -s$abbrev $args > "$OUT" 14 | match_diff "$LOG" "$OUT" 15 | done 16 | 17 | rm -f "$OUT" 18 | -------------------------------------------------------------------------------- /xlat/sigact_flags.in: -------------------------------------------------------------------------------- 1 | SA_RESTORER 2 | SA_STACK 3 | SA_RESTART 4 | SA_INTERRUPT 5 | SA_NODEFER 6 | #if defined SA_NOMASK && SA_NODEFER != SA_NOMASK 7 | SA_NOMASK 8 | #endif 9 | SA_RESETHAND 10 | #if defined SA_ONESHOT && SA_ONESHOT != SA_RESETHAND 11 | SA_ONESHOT 12 | #endif 13 | SA_SIGINFO 14 | SA_RESETHAND 15 | SA_ONSTACK 16 | SA_NODEFER 17 | SA_NOCLDSTOP 18 | SA_NOCLDWAIT 19 | _SA_BSDCALL 20 | SA_NOPTRACE 21 | -------------------------------------------------------------------------------- /linux/nios2/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = nios2_regs.regs[4]; 6 | tcp->u_arg[1] = nios2_regs.regs[5]; 7 | tcp->u_arg[2] = nios2_regs.regs[6]; 8 | tcp->u_arg[3] = nios2_regs.regs[7]; 9 | tcp->u_arg[4] = nios2_regs.regs[8]; 10 | tcp->u_arg[5] = nios2_regs.regs[9]; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /linux/s390/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = s390_regset.orig_gpr2; 6 | tcp->u_arg[1] = s390_regset.gprs[3]; 7 | tcp->u_arg[2] = s390_regset.gprs[4]; 8 | tcp->u_arg[3] = s390_regset.gprs[5]; 9 | tcp->u_arg[4] = s390_regset.gprs[6]; 10 | tcp->u_arg[5] = s390_regset.gprs[7]; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /linux/microblaze/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | static void 2 | arch_sigreturn(struct tcb *tcp) 3 | { 4 | /* TODO: Verify that this is correct... */ 5 | 6 | long addr; 7 | 8 | /* Read r1, the stack pointer. */ 9 | if (upeek(tcp->pid, 1 * 4, &addr) < 0) 10 | return; 11 | addr += offsetof(struct sigcontext, oldmask); 12 | 13 | tprints("{mask="); 14 | print_sigset_addr_len(tcp, addr, NSIG / 8); 15 | tprints("}"); 16 | } 17 | -------------------------------------------------------------------------------- /linux/or1k/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = or1k_regs.gpr[3 + 0]; 6 | tcp->u_arg[1] = or1k_regs.gpr[3 + 1]; 7 | tcp->u_arg[2] = or1k_regs.gpr[3 + 2]; 8 | tcp->u_arg[3] = or1k_regs.gpr[3 + 3]; 9 | tcp->u_arg[4] = or1k_regs.gpr[3 + 4]; 10 | tcp->u_arg[5] = or1k_regs.gpr[3 + 5]; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /linux/mips/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | tcp->scno = mips_REG_V0; 6 | 7 | if (!SCNO_IN_RANGE(tcp->scno)) { 8 | if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) { 9 | if (debug_flag) 10 | error_msg("stray syscall exit: v0 = %ld", 11 | tcp->scno); 12 | return 0; 13 | } 14 | } 15 | 16 | return 1; 17 | } 18 | -------------------------------------------------------------------------------- /linux/tile/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | static void 2 | arch_sigreturn(struct tcb *tcp) 3 | { 4 | /* offset of ucontext in the kernel's sigframe structure */ 5 | #define SIGFRAME_UC_OFFSET C_ABI_SAVE_AREA_SIZE + sizeof(siginfo_t) 6 | const long addr = tile_regs.sp + SIGFRAME_UC_OFFSET + 7 | offsetof(struct ucontext, uc_sigmask); 8 | 9 | tprints("{mask="); 10 | print_sigset_addr_len(tcp, addr, NSIG / 8); 11 | tprints("}"); 12 | } 13 | -------------------------------------------------------------------------------- /xlat/kexec_arch_values.in: -------------------------------------------------------------------------------- 1 | KEXEC_ARCH_DEFAULT ( 0 << 16) 2 | KEXEC_ARCH_386 ( 3 << 16) 3 | KEXEC_ARCH_68K ( 4 << 16) 4 | KEXEC_ARCH_X86_64 (62 << 16) 5 | KEXEC_ARCH_PPC (20 << 16) 6 | KEXEC_ARCH_PPC64 (21 << 16) 7 | KEXEC_ARCH_IA_64 (50 << 16) 8 | KEXEC_ARCH_ARM (40 << 16) 9 | KEXEC_ARCH_S390 (22 << 16) 10 | KEXEC_ARCH_SH (42 << 16) 11 | KEXEC_ARCH_MIPS_LE (10 << 16) 12 | KEXEC_ARCH_MIPS ( 8 << 16) 13 | -------------------------------------------------------------------------------- /linux/crisv10/arch_sigreturn.c: -------------------------------------------------------------------------------- 1 | static void 2 | arch_sigreturn(struct tcb *tcp) 3 | { 4 | long regs[PT_MAX + 1]; 5 | 6 | if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) { 7 | perror_msg("sigreturn: PTRACE_GETREGS"); 8 | return; 9 | } 10 | const long addr = regs[PT_USP] + offsetof(struct sigcontext, oldmask); 11 | 12 | tprints("{mask="); 13 | print_sigset_addr_len(tcp, addr, NSIG / 8); 14 | tprints("}"); 15 | } 16 | -------------------------------------------------------------------------------- /test/clone.c: -------------------------------------------------------------------------------- 1 | /* for CLONE_foo: */ 2 | #define _GNU_SOURCE 1 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int child(void* arg) 10 | { 11 | write(1, "clone\n", 6); 12 | return 0; 13 | } 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | char stack[4096]; 18 | clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL); 19 | write(1, "original\n", 9); 20 | exit(0); 21 | } 22 | -------------------------------------------------------------------------------- /linux/crisv10/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | static const int crisregs[MAX_ARGS] = { 6 | 4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12, 7 | 4*PT_R13 , 4*PT_MOF, 4*PT_SRP 8 | }; 9 | unsigned int i; 10 | 11 | for (i = 0; i < tcp->s_ent->nargs; ++i) 12 | if (upeek(tcp->pid, crisregs[i], &tcp->u_arg[i]) < 0) 13 | return -1; 14 | return 1; 15 | } 16 | -------------------------------------------------------------------------------- /tests/utimensat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of utimensat syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog > /dev/null 8 | run_strace -e utimensat $args > "$OUT" 9 | 10 | check_prog grep 11 | LC_ALL=C grep -x "utimensat(.*" "$LOG" > /dev/null || { 12 | rm -f "$OUT" 13 | skip_ 'test executable does not use utimensat syscall' 14 | } 15 | 16 | match_diff "$LOG" "$OUT" 17 | 18 | rm -f "$OUT" 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /tests/fstat.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check fstat syscall decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | # strace -P is implemented using /proc/self/fd 8 | [ -d /proc/self/fd/ ] || 9 | framework_skip_ '/proc/self/fd/ is not available' 10 | 11 | syscall=$NAME 12 | run_prog > /dev/null 13 | sample=$syscall.sample 14 | > "$sample" 15 | run_strace -ve$syscall -P$sample $args > "$OUT" 16 | match_diff "$LOG" "$OUT" 17 | rm -f "$OUT" 18 | 19 | exit 0 20 | -------------------------------------------------------------------------------- /tests/opipe.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check how -o '|pipe' works. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | check_prog grep 8 | run_prog grep chdir $srcdir/umovestr.expected > "$EXP" 9 | run_prog ./umovestr 10 | 11 | > "$LOG" || fail_ "failed to write $LOG" 12 | $STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args || 13 | dump_log_and_fail_with "$STRACE $args failed" 14 | 15 | match_diff "$OUT" "$EXP" 16 | rm -f "$EXP" "$OUT" 17 | -------------------------------------------------------------------------------- /xlat/netlink_protocols.in: -------------------------------------------------------------------------------- 1 | NETLINK_ROUTE 2 | NETLINK_UNUSED 3 | NETLINK_USERSOCK 4 | NETLINK_FIREWALL 5 | NETLINK_SOCK_DIAG 6 | NETLINK_NFLOG 7 | NETLINK_XFRM 8 | NETLINK_SELINUX 9 | NETLINK_ISCSI 10 | NETLINK_AUDIT 11 | NETLINK_FIB_LOOKUP 12 | NETLINK_CONNECTOR 13 | NETLINK_NETFILTER 14 | NETLINK_IP6_FW 15 | NETLINK_DNRTMSG 16 | NETLINK_KOBJECT_UEVENT 17 | NETLINK_GENERIC 18 | NETLINK_SCSITRANSPORT 19 | NETLINK_ECRYPTFS 20 | NETLINK_RDMA 21 | NETLINK_CRYPTO 22 | -------------------------------------------------------------------------------- /xlat/sysctl_vm.in: -------------------------------------------------------------------------------- 1 | VM_OVERCOMMIT_MEMORY 2 | VM_PAGE_CLUSTER 3 | VM_DIRTY_BACKGROUND 4 | VM_DIRTY_RATIO 5 | VM_DIRTY_WB_CS 6 | VM_DIRTY_EXPIRE_CS 7 | VM_NR_PDFLUSH_THREADS 8 | VM_OVERCOMMIT_RATIO 9 | VM_PAGEBUF 10 | VM_HUGETLB_PAGES 11 | VM_SWAPPINESS 12 | VM_LOWMEM_RESERVE_RATIO 13 | VM_MIN_FREE_KBYTES 14 | VM_MAX_MAP_COUNT 15 | VM_LAPTOP_MODE 16 | VM_BLOCK_DUMP 17 | VM_HUGETLB_GROUP 18 | VM_VFS_CACHE_PRESSURE 19 | VM_LEGACY_VA_LAYOUT 20 | VM_SWAP_TOKEN_TIMEOUT 21 | -------------------------------------------------------------------------------- /linux/x86_64/userent.h: -------------------------------------------------------------------------------- 1 | XLAT(8*R15), 2 | XLAT(8*R14), 3 | XLAT(8*R13), 4 | XLAT(8*R12), 5 | XLAT(8*RBP), 6 | XLAT(8*RBX), 7 | XLAT(8*R11), 8 | XLAT(8*R10), 9 | XLAT(8*R9), 10 | XLAT(8*R8), 11 | XLAT(8*RAX), 12 | XLAT(8*RCX), 13 | XLAT(8*RDX), 14 | XLAT(8*RSI), 15 | XLAT(8*RDI), 16 | XLAT(8*ORIG_RAX), 17 | XLAT(8*RIP), 18 | XLAT(8*CS), 19 | { 8*EFLAGS, "8*EFL" }, 20 | XLAT(8*RSP), 21 | XLAT(8*SS), 22 | /* Other fields in "struct user" */ 23 | #include "../i386/userent0.h" 24 | -------------------------------------------------------------------------------- /linux/avr32/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/avr32/include/ tree. */ 2 | { "asm/sockios.h", "FIOGETOWN", 0, 0x8903, 0 }, 3 | { "asm/sockios.h", "FIOSETOWN", 0, 0x8901, 0 }, 4 | { "asm/sockios.h", "SIOCATMARK", 0, 0x8905, 0 }, 5 | { "asm/sockios.h", "SIOCGPGRP", 0, 0x8904, 0 }, 6 | { "asm/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, 7 | { "asm/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, 8 | { "asm/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, 9 | -------------------------------------------------------------------------------- /linux/ia64/ioctls_arch0.h: -------------------------------------------------------------------------------- 1 | /* Generated by ioctls_gen.sh from definitions found in $linux/arch/ia64/include/ tree. */ 2 | { "asm/sockios.h", "FIOGETOWN", 0, 0x8903, 0 }, 3 | { "asm/sockios.h", "FIOSETOWN", 0, 0x8901, 0 }, 4 | { "asm/sockios.h", "SIOCATMARK", 0, 0x8905, 0 }, 5 | { "asm/sockios.h", "SIOCGPGRP", 0, 0x8904, 0 }, 6 | { "asm/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, 7 | { "asm/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, 8 | { "asm/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, 9 | -------------------------------------------------------------------------------- /linux/sh64/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | /* Registers used by SH5 Linux system calls for parameters */ 6 | static const int syscall_regs[MAX_ARGS] = { 2, 3, 4, 5, 6, 7 }; 7 | unsigned int i; 8 | 9 | for (i = 0; i < tcp->s_ent->nargs; ++i) 10 | if (upeek(tcp->pid, REG_GENERAL(syscall_regs[i]), 11 | &tcp->u_arg[i]) < 0) 12 | return -1; 13 | return 1; 14 | } 15 | -------------------------------------------------------------------------------- /tests/read-write.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding and dumping of read and write syscalls. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | # strace -P is implemented using /proc/self/fd 8 | [ -d /proc/self/fd/ ] || 9 | framework_skip_ '/proc/self/fd/ is not available' 10 | 11 | tmpfile=read-write-tmpfile 12 | > $tmpfile 13 | 14 | run_strace_match_diff \ 15 | -a15 -eread=0 -ewrite=1 -e trace=read,write \ 16 | -P $tmpfile -P /dev/zero -P /dev/null 17 | 18 | rm -f $tmpfile 19 | -------------------------------------------------------------------------------- /utime.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | #include DEF_MPERS_TYPE(utimbuf_t) 4 | 5 | #include 6 | 7 | typedef struct utimbuf utimbuf_t; 8 | 9 | #include MPERS_DEFS 10 | 11 | SYS_FUNC(utime) 12 | { 13 | utimbuf_t u; 14 | 15 | printpath(tcp, tcp->u_arg[0]); 16 | tprints(", "); 17 | if (!umove_or_printaddr(tcp, tcp->u_arg[1], &u)) { 18 | tprintf("[%s,", sprinttime(u.actime)); 19 | tprintf(" %s]", sprinttime(u.modtime)); 20 | } 21 | 22 | return RVAL_DECODED; 23 | } 24 | -------------------------------------------------------------------------------- /xlat/sockpacketoptions.in: -------------------------------------------------------------------------------- 1 | PACKET_ADD_MEMBERSHIP 2 | PACKET_DROP_MEMBERSHIP 3 | PACKET_RECV_OUTPUT 4 | PACKET_RX_RING 5 | PACKET_STATISTICS 6 | PACKET_COPY_THRESH 7 | PACKET_AUXDATA 8 | PACKET_ORIGDEV 9 | PACKET_VERSION 10 | PACKET_HDRLEN 11 | PACKET_RESERVE 12 | PACKET_TX_RING 13 | PACKET_LOSS 14 | PACKET_VNET_HDR 15 | PACKET_TX_TIMESTAMP 16 | PACKET_TIMESTAMP 17 | PACKET_FANOUT 18 | PACKET_TX_HAS_OFF 19 | PACKET_QDISC_BYPASS 20 | PACKET_ROLLOVER_STATS 21 | PACKET_FANOUT_DATA 22 | -------------------------------------------------------------------------------- /hostname.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | SYS_FUNC(sethostname) 4 | { 5 | printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]); 6 | tprintf(", %lu", tcp->u_arg[1]); 7 | 8 | return RVAL_DECODED; 9 | } 10 | 11 | #if defined(ALPHA) 12 | SYS_FUNC(gethostname) 13 | { 14 | if (exiting(tcp)) { 15 | if (syserror(tcp)) 16 | printaddr(tcp->u_arg[0]); 17 | else 18 | printstr(tcp, tcp->u_arg[0], -1); 19 | tprintf(", %lu", tcp->u_arg[1]); 20 | } 21 | return 0; 22 | } 23 | #endif /* ALPHA */ 24 | -------------------------------------------------------------------------------- /linux/sparc/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | tcp->u_arg[0] = sparc_regs.u_regs[U_REG_O0 + 0]; 6 | tcp->u_arg[1] = sparc_regs.u_regs[U_REG_O0 + 1]; 7 | tcp->u_arg[2] = sparc_regs.u_regs[U_REG_O0 + 2]; 8 | tcp->u_arg[3] = sparc_regs.u_regs[U_REG_O0 + 3]; 9 | tcp->u_arg[4] = sparc_regs.u_regs[U_REG_O0 + 4]; 10 | tcp->u_arg[5] = sparc_regs.u_regs[U_REG_O0 + 5]; 11 | return 1; 12 | } 13 | -------------------------------------------------------------------------------- /bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | for m in m32 mx32; do 4 | tests=tests-$m 5 | rm -rf $tests 6 | mkdir $tests 7 | s='[[:space:]]*' 8 | sed "s/@arch@/@arch_$m@/;s/^MPERS_NAME$s=.*/& $m/;s/^ARCH_MFLAGS$s=.*/& -$m/" \ 9 | tests/Makefile.am > $tests/Makefile.am 10 | for f in tests/*; do 11 | case "${f##*/}" in 12 | Makefile*) continue;; 13 | esac 14 | ln -s ../"$f" $tests/ 15 | done 16 | done 17 | 18 | ./generate_mpers_am.sh 19 | ./xlat/gen.sh 20 | 21 | exec autoreconf -f -i "$@" 22 | -------------------------------------------------------------------------------- /linux/ia64/get_error.c: -------------------------------------------------------------------------------- 1 | static void 2 | get_error(struct tcb *tcp, const bool check_errno) 3 | { 4 | if (ia64_ia32mode) { 5 | int err = ia64_regs.gr[8]; 6 | if (check_errno && is_negated_errno(err)) { 7 | tcp->u_rval = -1; 8 | tcp->u_error = -err; 9 | } else { 10 | tcp->u_rval = err; 11 | } 12 | } else { 13 | if (ia64_regs.gr[10]) { 14 | tcp->u_rval = -1; 15 | tcp->u_error = ia64_regs.gr[8]; 16 | } else { 17 | tcp->u_rval = ia64_regs.gr[8]; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/strace-t.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check -t option. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog_skip_if_failed date +%T > /dev/null 8 | run_prog ./sleep 0 9 | 10 | t0="$(date +%T)" 11 | run_strace -t -eexecve $args 12 | t1="$(date +%T)" 13 | 14 | EXPECTED="$LOG.expected" 15 | cat > "$EXPECTED" << __EOF__ 16 | ($t0|$t1) execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 17 | __EOF__ 18 | 19 | match_grep "$LOG" "$EXPECTED" 20 | rm -f "$EXPECTED" 21 | -------------------------------------------------------------------------------- /linux/aarch64/get_error.c: -------------------------------------------------------------------------------- 1 | #define get_error arm_get_error 2 | #include "arm/get_error.c" 3 | #undef get_error 4 | 5 | static void 6 | get_error(struct tcb *tcp, const bool check_errno) 7 | { 8 | if (tcp->currpers == 1) { 9 | arm_get_error(tcp, check_errno); 10 | return; 11 | } 12 | 13 | if (check_errno && is_negated_errno(aarch64_regs.regs[0])) { 14 | tcp->u_rval = -1; 15 | tcp->u_error = -aarch64_regs.regs[0]; 16 | } else { 17 | tcp->u_rval = aarch64_regs.regs[0]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/pread64-pwrite64.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding and dumping of pread64 and pwrite64 syscalls. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | # strace -P is implemented using /proc/self/fd 8 | [ -d /proc/self/fd/ ] || 9 | framework_skip_ '/proc/self/fd/ is not available' 10 | 11 | tmpfile=pread64-pwrite64-tmpfile 12 | > $tmpfile 13 | 14 | run_strace_match_diff \ 15 | -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 \ 16 | -P $tmpfile -P /dev/zero -P /dev/null 17 | 18 | rm -f $tmpfile 19 | -------------------------------------------------------------------------------- /sigreturn.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | #include 3 | #include "regs.h" 4 | #include "ptrace.h" 5 | 6 | #if defined HAVE_ASM_SIGCONTEXT_H && !defined HAVE_STRUCT_SIGCONTEXT 7 | # include 8 | #endif 9 | 10 | #ifndef NSIG 11 | # warning NSIG is not defined, using 32 12 | # define NSIG 32 13 | #elif NSIG < 32 14 | # error NSIG < 32 15 | #endif 16 | 17 | #include "arch_sigreturn.c" 18 | 19 | SYS_FUNC(sigreturn) 20 | { 21 | arch_sigreturn(tcp); 22 | 23 | return RVAL_DECODED; 24 | } 25 | -------------------------------------------------------------------------------- /tests/strace-tt.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check -tt option. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog_skip_if_failed date +%T > /dev/null 8 | run_prog ./sleep 0 9 | 10 | t0="$(date +%T)" 11 | run_strace -tt -eexecve $args 12 | t1="$(date +%T)" 13 | 14 | EXPECTED="$LOG.expected" 15 | cat > "$EXPECTED" << __EOF__ 16 | ($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 17 | __EOF__ 18 | 19 | match_grep "$LOG" "$EXPECTED" 20 | rm -f "$EXPECTED" 21 | -------------------------------------------------------------------------------- /linux/sh/get_syscall_args.c: -------------------------------------------------------------------------------- 1 | /* Return -1 on error or 1 on success (never 0!). */ 2 | static int 3 | get_syscall_args(struct tcb *tcp) 4 | { 5 | static const int syscall_regs[MAX_ARGS] = { 6 | 4 * (REG_REG0+4), 7 | 4 * (REG_REG0+5), 8 | 4 * (REG_REG0+6), 9 | 4 * (REG_REG0+7), 10 | 4 * (REG_REG0 ), 11 | 4 * (REG_REG0+1) 12 | }; 13 | unsigned int i; 14 | 15 | for (i = 0; i < tcp->s_ent->nargs; ++i) 16 | if (upeek(tcp->pid, syscall_regs[i], &tcp->u_arg[i]) < 0) 17 | return -1; 18 | return 1; 19 | } 20 | -------------------------------------------------------------------------------- /tests/dumpio.expected: -------------------------------------------------------------------------------- 1 | sendto(0, "zyxwvutsrqponmlkjihgfedcba", 26, MSG_DONTROUTE, NULL, 0) = 26 2 | | 00000 7a 79 78 77 76 75 74 73 72 71 70 6f 6e 6d 6c 6b zyxwvutsrqponmlk | 3 | | 00010 6a 69 68 67 66 65 64 63 62 61 jihgfedcba | 4 | recvfrom(0, "abcdefghijklmnopqrstuvwxyz", 26, MSG_WAITALL, NULL, NULL) = 26 5 | | 00000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 abcdefghijklmnop | 6 | | 00010 71 72 73 74 75 76 77 78 79 7a qrstuvwxyz | 7 | +++ exited with 0 +++ 8 | -------------------------------------------------------------------------------- /tests/strace-ttt.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check -ttt option. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | run_prog_skip_if_failed date +%s > /dev/null 8 | run_prog ./sleep 0 9 | 10 | t0="$(date +%s)" 11 | run_strace -ttt -eexecve $args 12 | t1="$(date +%s)" 13 | 14 | EXPECTED="$LOG.expected" 15 | cat > "$EXPECTED" << __EOF__ 16 | ($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 17 | __EOF__ 18 | 19 | match_grep "$LOG" "$EXPECTED" 20 | rm -f "$EXPECTED" 21 | -------------------------------------------------------------------------------- /test/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -Wall 2 | 3 | PROGS = \ 4 | sig skodic clone leaderkill childthread \ 5 | sigkill_rain wait_must_be_interruptible threaded_execve \ 6 | mtd ubi seccomp sfd mmap_offset_decode x32_lseek x32_mmap \ 7 | many_looping_threads 8 | 9 | all: $(PROGS) 10 | 11 | leaderkill: LDFLAGS += -pthread 12 | 13 | childthread: LDFLAGS += -pthread 14 | 15 | many_looping_threads: LDFLAGS += -pthread 16 | 17 | clean distclean: 18 | rm -f *.o core $(PROGS) *.gdb 19 | 20 | .PHONY: all clean distclean 21 | -------------------------------------------------------------------------------- /access.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | #include 4 | 5 | #include "xlat/access_flags.h" 6 | 7 | static int 8 | decode_access(struct tcb *tcp, int offset) 9 | { 10 | printpath(tcp, tcp->u_arg[offset]); 11 | tprints(", "); 12 | printflags(access_flags, tcp->u_arg[offset + 1], "?_OK"); 13 | 14 | return RVAL_DECODED; 15 | } 16 | 17 | SYS_FUNC(access) 18 | { 19 | return decode_access(tcp, 0); 20 | } 21 | 22 | SYS_FUNC(faccessat) 23 | { 24 | print_dirfd(tcp, tcp->u_arg[0]); 25 | return decode_access(tcp, 1); 26 | } 27 | -------------------------------------------------------------------------------- /swapon.c: -------------------------------------------------------------------------------- 1 | #include "defs.h" 2 | 3 | #include 4 | 5 | #include "xlat/swap_flags.h" 6 | 7 | SYS_FUNC(swapon) 8 | { 9 | unsigned int flags = tcp->u_arg[1]; 10 | unsigned int prio = flags & SWAP_FLAG_PRIO_MASK; 11 | flags &= ~SWAP_FLAG_PRIO_MASK; 12 | 13 | printpath(tcp, tcp->u_arg[0]); 14 | tprints(", "); 15 | if (flags) { 16 | printflags(swap_flags, flags, "SWAP_FLAG_???"); 17 | if (prio) 18 | tprintf("|%u", prio); 19 | } else { 20 | tprintf("%u", prio); 21 | } 22 | 23 | return RVAL_DECODED; 24 | } 25 | -------------------------------------------------------------------------------- /tests/utime.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check decoding of utime syscall. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | $STRACE -e utime -h > /dev/null || 8 | skip_ 'utime syscall is not supported on this architecture' 9 | 10 | run_prog > /dev/null 11 | run_strace -a 16 -e utime $args > "$OUT" 12 | 13 | check_prog grep 14 | LC_ALL=C grep -x "utime(.*" "$LOG" > /dev/null || { 15 | rm -f "$OUT" 16 | skip_ 'test executable does not use utime syscall' 17 | } 18 | match_diff "$LOG" "$OUT" 19 | 20 | rm -f "$OUT" 21 | 22 | exit 0 23 | -------------------------------------------------------------------------------- /generate_mpers_am.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | list="$(sed -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*\([[:alnum:]][^.]*\.c\)[[:space:]]*\\$/\1/p' Makefile.am | 4 | xargs -r grep -lx '#[[:space:]]*include[[:space:]]\+MPERS_DEFS' | 5 | tr '\n' ' ')" 6 | 7 | cat > mpers.am < mpers_xlat.h 14 | -------------------------------------------------------------------------------- /linux/tile/get_scno.c: -------------------------------------------------------------------------------- 1 | /* Return codes: 1 - ok, 0 - ignore, other - error. */ 2 | static int 3 | arch_get_scno(struct tcb *tcp) 4 | { 5 | unsigned int currpers; 6 | 7 | #ifdef __tilepro__ 8 | currpers = 1; 9 | #else 10 | # ifndef PT_FLAGS_COMPAT 11 | # define PT_FLAGS_COMPAT 0x10000 /* from Linux 3.8 on */ 12 | # endif 13 | if (tile_regs.flags & PT_FLAGS_COMPAT) 14 | currpers = 1; 15 | else 16 | currpers = 0; 17 | #endif 18 | update_personality(tcp, currpers); 19 | tcp->scno = tile_regs.regs[10]; 20 | 21 | return 1; 22 | } 23 | -------------------------------------------------------------------------------- /tests/uid.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check uid decoding. 4 | 5 | . "${srcdir=.}/init.sh" 6 | 7 | s="${uid_syscall_suffix-}" 8 | w="${uid_t_size-}" 9 | 10 | run_prog ./uid$s$w 11 | 12 | case "$STRACE_ARCH" in 13 | alpha) getuid=getxuid ;; 14 | *) getuid=getuid ;; 15 | esac 16 | 17 | syscalls="$getuid$s,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s" 18 | run_strace -e trace="$syscalls" $args 19 | 20 | AWK=gawk 21 | match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s" 22 | 23 | exit 0 24 | --------------------------------------------------------------------------------