]> granicus.if.org Git - strace/log
strace
9 years agoget_robust_list.c: use printnum_long
Dmitry V. Levin [Mon, 20 Jul 2015 11:40:43 +0000 (11:40 +0000)]
get_robust_list.c: use printnum_long

* get_robust_list.c (sys_get_robust_list): Use printnum_long.

9 years agogetcpu.c: use printnum_int and printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 11:36:46 +0000 (11:36 +0000)]
getcpu.c: use printnum_int and printaddr

* getcpu.c (sys_getcpu): Use printnum_int and printaddr.

9 years agogetcwd.c: use printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 11:35:03 +0000 (11:35 +0000)]
getcwd.c: use printaddr

* getcwd.c (sys_getcwd): Use printaddr.

9 years agogetrandom.c: use printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 11:33:06 +0000 (11:33 +0000)]
getrandom.c: use printaddr

* getrandom.c (sys_getrandom): Use printaddr.

9 years agohostname.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 20 Jul 2015 11:30:38 +0000 (11:30 +0000)]
hostname.c: make use of RVAL_DECODED

* hostname.c (sys_sethostname): Update for RVAL_DECODED.

9 years agohostname.c: use printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 11:29:20 +0000 (11:29 +0000)]
hostname.c: use printaddr

* hostname.c (sys_gethostname): Use printaddr.

9 years agoinotify.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 20 Jul 2015 11:25:52 +0000 (11:25 +0000)]
inotify.c: make use of RVAL_DECODED

* inotify.c (sys_inotify_add_watch, sys_inotify_rm_watch,
sys_inotify_init1): Update for RVAL_DECODED.

9 years agoio.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 20 Jul 2015 11:19:30 +0000 (11:19 +0000)]
io.c: make use of RVAL_DECODED

* io.c (sys_write, sys_writev, sys_pwrite, sys_pwritev, sys_sendfile,
sys_sendfile64, sys_tee, sys_splice, sys_vmsplice): Update
for RVAL_DECODED.

9 years agoUse printnum_int64 instead of print_loff_t
Dmitry V. Levin [Mon, 20 Jul 2015 11:14:12 +0000 (11:14 +0000)]
Use printnum_int64 instead of print_loff_t

* defs.h (print_loff_t): Remove.
* io.c (print_loff_t): Remove.
(sys_sendfile64, sys_splice): Use printnum_int64 instead of print_loff_t.
* mtd.c (mtd_ioctl): Likewise.

9 years agoio.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 11:06:54 +0000 (11:06 +0000)]
io.c: use printaddr and umove_or_printaddr

* io.c (sys_read, sys_pread): Use printaddr.
(tprint_iov_upto): Do not fetch data in case of syserror.
Use printaddr.
(sys_readv, sys_preadv): Remove redundant check for syserror.
(print_off_t): Use printnum_int and printnum_long.
(print_loff_t): Use umove_or_printaddr.

9 years agoioprio.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 20 Jul 2015 10:42:49 +0000 (10:42 +0000)]
ioprio.c: make use of RVAL_DECODED

* ioprio.c (sys_ioprio_set): Update for RVAL_DECODED.

9 years agoipc.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 10:11:33 +0000 (10:11 +0000)]
ipc.c: use printaddr and umove_or_printaddr

* ipc.c (sys_msgctl): Use printaddr.
(tprint_msgbuf): New function.
(tprint_msgsnd, tprint_msgrcv): Use it.
(sys_msgrcv): Use umove_or_printaddr.
(tprint_sembuf): Rename to tprint_sembuf_array.
(tprint_sembuf): New function.
(tprint_sembuf_array): Use it.
(sys_semop, sys_semtimedop): Update callers.
(sys_shmctl, sys_shmat, sys_shmdt): Use printaddr.
(sys_mq_open, printmqattr): Use printaddr and umove_or_printaddr.
* tests/ipc_msg.c (main): Update msgctl IPC_RMID regexp.
* tests/ipc_shm.c (main): Update shmctl IPC_RMID regexp.

9 years agokexec.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 01:20:44 +0000 (01:20 +0000)]
kexec.c: use printaddr and umove_or_printaddr

* kexec.c (print_seg): New function.
(print_kexec_segments): Use it.  Use printaddr and umove_or_printaddr.
(kexec_load): Use printaddr.  Update for RVAL_DECODED.

9 years agokeyctl.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 20 Jul 2015 00:48:49 +0000 (00:48 +0000)]
keyctl.c: make use of RVAL_DECODED

* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers.  Update for RVAL_DECODED.

9 years agokeyctl.c: use printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 00:26:23 +0000 (00:26 +0000)]
keyctl.c: use printaddr

* keyctl.c (keyctl_read_key): Use printaddr.

9 years agoldt.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 20 Jul 2015 00:19:09 +0000 (00:19 +0000)]
ldt.c: make use of RVAL_DECODED

* ldt.c (sys_modify_ldt, sys_set_thread_area, sys_get_thread_area):
Update for RVAL_DECODED.

9 years agoldt.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Mon, 20 Jul 2015 00:10:35 +0000 (00:10 +0000)]
ldt.c: use printaddr and umove_or_printaddr

* ldt.c [I386 || X86_64 || X32] (print_user_desc):
Use umove_or_printaddr.
[I386 || X86_64 || X32] (sys_modify_ldt): Use printaddr.
[(M68K || MIPS] (set_thread_area): Likewise.
[I386 || X86_64 || X32] (set_thread_area): Do not fetch data
if !verbose.
[I386 || X86_64 || X32] (get_thread_area): Remove redundant check
for syserror.

9 years agolink.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 20 Jul 2015 00:01:55 +0000 (00:01 +0000)]
link.c: make use of RVAL_DECODED

* link.c (sys_link, sys_linkat, sys_unlinkat, sys_symlinkat): Update
for RVAL_DECODED.

9 years agolseek.c: make use of RVAL_DECODED
Dmitry V. Levin [Sun, 19 Jul 2015 23:58:13 +0000 (23:58 +0000)]
lseek.c: make use of RVAL_DECODED

* lseek.c (sys_lseek): Update for RVAL_DECODED.

9 years agolseek.c: use printnum_int64
Dmitry V. Levin [Sun, 19 Jul 2015 23:55:25 +0000 (23:55 +0000)]
lseek.c: use printnum_int64

* lseek.c (sys_llseek): Use printnum_int64.

9 years agomem.c: make use of RVAL_DECODED
Dmitry V. Levin [Sun, 19 Jul 2015 23:37:40 +0000 (23:37 +0000)]
mem.c: make use of RVAL_DECODED

* mem.c (print_mmap): Change to return void.
Update for RVAL_DECODED.
(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
sys_mmap_4koff): Update callers.  Update for RVAL_DECODED.
(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
Update for RVAL_DECODED.

9 years agomem.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Sun, 19 Jul 2015 23:25:56 +0000 (23:25 +0000)]
mem.c: use printaddr and umove_or_printaddr

* mem.c (sys_brk, print_mmap, sys_munmap, sys_mprotect, sys_mremap,
sys_madvise, sys_msync, sys_mincore, sys_remap_file_pages, get_nodes,
sys_mbind, [POWERPC] sys_subpage_prot): Use printaddr.
(sys_get_mempolicy): Use printaddr and umove_or_printaddr.

9 years agomknod.c: make use of RVAL_DECODED
Dmitry V. Levin [Sun, 19 Jul 2015 23:07:17 +0000 (23:07 +0000)]
mknod.c: make use of RVAL_DECODED

* mknod.c (decode_mknod): Change to return void.
Update for RVAL_DECODED.
(sys_mknod, sys_mknodat): Update callers.  Update for RVAL_DECODED.
[SPARC || SPARC64] (xmknod): Update for RVAL_DECODED.

9 years agomount.c: make use of RVAL_DECODED
Dmitry V. Levin [Sun, 19 Jul 2015 23:00:35 +0000 (23:00 +0000)]
mount.c: make use of RVAL_DECODED

* mount.c (sys_mount): Update for RVAL_DECODED.

9 years agomount.c: use printaddr
Dmitry V. Levin [Sun, 19 Jul 2015 22:58:19 +0000 (22:58 +0000)]
mount.c: use printaddr

* mount.c (sys_mount): Use printaddr.

9 years agoAlias sys_connect to sys_bind
Dmitry V. Levin [Sun, 19 Jul 2015 22:55:56 +0000 (22:55 +0000)]
Alias sys_connect to sys_bind

* linux/dummy.h (sys_connect): Alias to sys_bind.
* net.c (sys_connect): Remove.

9 years agonet.c: make use of RVAL_DECODED
Dmitry V. Levin [Sun, 19 Jul 2015 22:52:47 +0000 (22:52 +0000)]
net.c: make use of RVAL_DECODED

* net.c (sys_socket, sys_bind, sys_listen, sys_send, sys_sendto,
sys_sendmsg, sys_shutdown, sys_setsockopt): Update for RVAL_DECODED.

9 years agonet.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Sun, 19 Jul 2015 22:36:46 +0000 (22:36 +0000)]
net.c: use printaddr and umove_or_printaddr

* net.c (printsock): Use printaddr and umove_or_printaddr.
(printcmsghdr, printmsghdr, printmmsghdr, decode_mmsg, do_sockname,
sys_recv, sys_recvfrom, sys_recvmsg, do_pipe, print_linger, print_ucred,
print_tpacket_stats, print_icmp_filter, print_getsockopt,
print_group_req, print_tpacket_req, print_packet_mreq,
print_setsockopt): Use printaddr.
(print_mreq, print_mreq6): Use umove_or_printaddr.

9 years agotests: add sigaltstack.test
Elvira Khabirova [Fri, 17 Jul 2015 01:45:25 +0000 (04:45 +0300)]
tests: add sigaltstack.test

* tests/sigaltstack.c: New file.
* tests/sigaltstack.expected: Likewise.
* tests/sigaltstack.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sigaltstack.
(TESTS): Add sigaltstack.test.
(EXTRA_DIST): sigaltstack.expected.
* tests/.gitignore: Add sigaltstack.

9 years agobootstrap: delete personality test directories beforehand
Elvira Khabirova [Thu, 16 Jul 2015 13:34:49 +0000 (16:34 +0300)]
bootstrap: delete personality test directories beforehand

* bootstrap: Delete tests-m32 and tests-mx32 directories
before creating them.

9 years agodefs.h: do not include <signal.h>
Dmitry V. Levin [Fri, 17 Jul 2015 23:56:54 +0000 (23:56 +0000)]
defs.h: do not include <signal.h>

* printsiginfo.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h: Do not include <signal.h>.
(printsiginfo): Remove.
* printsiginfo.c: Include <signal.h> and "printsiginfo.h".
* strace.c: Likewise.
* sigaltstack.c: Include <signal.h>.
* signal.c: Likewise.
* sigreturn.c: Likewise.
* time.c: Likewise.

9 years agoresource.c: move printrusage and printrusage32 to a separate file
Dmitry V. Levin [Fri, 17 Jul 2015 23:50:02 +0000 (23:50 +0000)]
resource.c: move printrusage and printrusage32 to a separate file

* printrusage.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* resource.c (printrusage, [ALPHA] printrusage32): Move
to printrusage.c.

9 years agoopen.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 22:03:29 +0000 (22:03 +0000)]
open.c: make use of RVAL_DECODED

* open.c (decode_open, sys_creat): Update for RVAL_DECODED.

9 years agopersonality.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 21:53:45 +0000 (21:53 +0000)]
personality.c: make use of RVAL_DECODED

* personality.c (sys_personality): Update for RVAL_DECODED.

9 years agoprintsiginfo.c: use umove_or_printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 21:58:18 +0000 (21:58 +0000)]
printsiginfo.c: use umove_or_printaddr

* printsiginfo.c (printsiginfo_at): Use umove_or_printaddr.

9 years agoprctl.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 21:49:17 +0000 (21:49 +0000)]
prctl.c: make use of RVAL_DECODED

* prctl.c (prctl_enter, prctl_exit): Merge into sys_prctl.
(sys_prctl, sys_arch_prctl): Update for RVAL_DECODED.

9 years agoprctl.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 21:14:16 +0000 (21:14 +0000)]
prctl.c: use printaddr and umove_or_printaddr

* prctl.c (prctl_exit): Use printaddr and umove_or_printaddr.

9 years agoprocess.c: use printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 21:12:05 +0000 (21:12 +0000)]
process.c: use printaddr

* process.c (sys_ptrace): Use printaddr.

9 years agoprocess_vm.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 20:39:49 +0000 (20:39 +0000)]
process_vm.c: make use of RVAL_DECODED

* process_vm.c (sys_process_vm_writev): Update for RVAL_DECODED.

9 years agoprocess_vm.c: use printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 20:37:47 +0000 (20:37 +0000)]
process_vm.c: use printaddr

* process_vm.c (sys_process_vm_readv): Use printaddr.

9 years agoreboot.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 20:27:00 +0000 (20:27 +0000)]
reboot.c: make use of RVAL_DECODED

* reboot.c (sys_reboot): Update for RVAL_DECODED.

9 years agoEnhance quotactl decoding
Dmitry V. Levin [Fri, 17 Jul 2015 17:35:07 +0000 (17:35 +0000)]
Enhance quotactl decoding

* quota.c (decode_cmd_data): Use umove_or_printaddr.
(sys_quotactl): Do not disable the parser in verbose mode.
Decode all "set" commands on entering syscall.

9 years agoreadahead.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 17:26:27 +0000 (17:26 +0000)]
readahead.c: make use of RVAL_DECODED

* readahead.c (sys_readahead.c): Update for RVAL_DECODED.

9 years agoreadlink.c: use printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 17:24:41 +0000 (17:24 +0000)]
readlink.c: use printaddr

* readlink.c (decode_readlink): Use printaddr.

9 years agorenameat.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 17:22:24 +0000 (17:22 +0000)]
renameat.c: make use of RVAL_DECODED

* renameat.c (sys_renameat, sys_renameat2): Update for RVAL_DECODED.

9 years agoresource.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 16:39:54 +0000 (16:39 +0000)]
resource.c: make use of RVAL_DECODED

* resource.c (sys_setrlimit, sys_getpriority, sys_setpriority):
Update for RVAL_DECODED.

9 years agoresource.c: use umove_or_printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 16:25:21 +0000 (16:25 +0000)]
resource.c: use umove_or_printaddr

* resource.c (print_rlimit64, print_rlimit32, printrusage32,
printrusage, sys_times): Use umove_or_printaddr.
(decode_rlimit64): Remove.
(decode_rlimit): Remove redundant checks.
[defined(current_wordsize) && current_wordsize != 4] (decode_rlimit):
Define to print_rlimit64.
(sys_prlimit64): Replace decode_rlimit64 with print_rlimit64.

9 years agosched.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 16:16:24 +0000 (16:16 +0000)]
sched.c: make use of RVAL_DECODED

* sched.c (sys_sched_setscheduler, sys_sched_setparam,
sys_sched_get_priority_min): Update for RVAL_DECODED.

9 years agosched.c: use printnum_int and printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 16:12:22 +0000 (16:12 +0000)]
sched.c: use printnum_int and printaddr

* sched.c (sys_sched_setscheduler, sys_sched_getparam,
sys_sched_setparam): Use printnum_int for sched_param decoding.
(sched_rr_get_interval): Use printaddr.

9 years agoscsi.c: use printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 16:00:18 +0000 (16:00 +0000)]
scsi.c: use printaddr

* scsi.c (print_sg_io_buffer): Use printaddr.

9 years agoseccomp.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 01:14:51 +0000 (01:14 +0000)]
seccomp.c: make use of RVAL_DECODED

* seccomp.c (sys_seccomp): Update for RVAL_DECODED.

9 years agoseccomp.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 01:10:45 +0000 (01:10 +0000)]
seccomp.c: use printaddr and umove_or_printaddr

* seccomp.c (decode_fprog, decode_seccomp_set_mode_strict):
Use printaddr.
(print_seccomp_filter): Use umove_or_printaddr.

9 years agosigaltstack.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 01:05:46 +0000 (01:05 +0000)]
sigaltstack.c: use printaddr and umove_or_printaddr

* sigaltstack.c (print_stack_t): Use umove_or_printaddr and printaddr.

9 years agosignal.c: make use of RVAL_DECODED
Dmitry V. Levin [Fri, 17 Jul 2015 00:51:45 +0000 (00:51 +0000)]
signal.c: make use of RVAL_DECODED

* signal.c (sys_sigsuspend, sys_kill, sys_tgkill, sys_rt_sigsuspend,
sys_rt_sigqueueinfo, sys_rt_tgsigqueueinfo, sys_restart_syscall,
do_signalfd): Update for RVAL_DECODED.

9 years agosignal.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Fri, 17 Jul 2015 00:37:39 +0000 (00:37 +0000)]
signal.c: use printaddr and umove_or_printaddr

* signal.c (print_sigset_addr_len, decode_old_sigaction):
Use printaddr and umove_or_printaddr.
(sys_signal): Use printaddr.
(sys_sigprocmask, sys_sigpending, sys_rt_sigprocmask,
sys_rt_sigpending): Remove redundant checks for syserror.
(decode_new_sigaction): Use umove_or_printaddr.

9 years agosram_alloc.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 23:40:40 +0000 (23:40 +0000)]
sram_alloc.c: make use of RVAL_DECODED

* sram_alloc.c [BFIN] (sys_sram_alloc): Update for RVAL_DECODED.

9 years agostatfs.c: use umove_or_printaddr
Dmitry V. Levin [Thu, 16 Jul 2015 23:32:12 +0000 (23:32 +0000)]
statfs.c: use umove_or_printaddr

* statfs.c (printstatfs, printstatfs64, printcompat_statfs64):
Use umove_or_printaddr.

9 years agoswapon.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 23:28:07 +0000 (23:28 +0000)]
swapon.c: make use of RVAL_DECODED

* swapon.c (sys_swapon): Update for RVAL_DECODED.

9 years agoswapon.c: move fallback definitions of swap options to xlat/
Dmitry V. Levin [Thu, 16 Jul 2015 23:25:36 +0000 (23:25 +0000)]
swapon.c: move fallback definitions of swap options to xlat/

* swapon.c: Move definitions of SWAP_FLAG_* flags ...
* xlat/swap_flags.in: ... here.

9 years agosync_file_range2: fix typo in flags decoding
Dmitry V. Levin [Thu, 16 Jul 2015 23:20:33 +0000 (23:20 +0000)]
sync_file_range2: fix typo in flags decoding

* sync_file_range.c (sys_sync_file_range2): Fix typo in flags decoding.

9 years agosync_file_range.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 23:15:46 +0000 (23:15 +0000)]
sync_file_range.c: make use of RVAL_DECODED

* sync_file_range.c (sys_sync_file_range, sys_sync_file_range2): Update
for RVAL_DECODED.

9 years agosyslog.c: use umove_or_printaddr and RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 23:11:23 +0000 (23:11 +0000)]
syslog.c: use umove_or_printaddr and RVAL_DECODED

* sysctl.c (sys_sysctl): Use umove_or_printaddr and RVAL_DECODED.

9 years agosysinfo.c: use umove_or_printaddr
Dmitry V. Levin [Thu, 16 Jul 2015 22:08:02 +0000 (22:08 +0000)]
sysinfo.c: use umove_or_printaddr

* sysinfo.c (sys_sysinfo): Use umove_or_printaddr.

9 years agosyslog.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 22:03:03 +0000 (22:03 +0000)]
syslog.c: make use of RVAL_DECODED

* syslog.c (sys_syslog): Update for RVAL_DECODED.

9 years agosyslog.c: use printaddr
Dmitry V. Levin [Thu, 16 Jul 2015 21:59:53 +0000 (21:59 +0000)]
syslog.c: use printaddr

* syslog.c (sys_syslog): Use printaddr.

9 years agosysmips.c: cleanup
Dmitry V. Levin [Thu, 16 Jul 2015 21:46:05 +0000 (21:46 +0000)]
sysmips.c: cleanup

* sysmips.c [MIPS] (sys_sysmips): Use switch statement.  Use printaddr.
Fix misprinted ", " delimiter.

9 years agosysmips.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 21:35:41 +0000 (21:35 +0000)]
sysmips.c: make use of RVAL_DECODED

* sysmips.c [MIPS] (sys_sysmips): Update for RVAL_DECODED.

9 years agotime.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 21:07:06 +0000 (21:07 +0000)]
time.c: make use of RVAL_DECODED

* time.c (sys_settimeofday, sys_osf_settimeofday, sys_clock_settime,
sys_timerfd, sys_timerfd_create, sys_timerfd_settime): Update
for RVAL_DECODED.
(timerfd_gettime): Decode struct itimerspec argument on exiting syscall.

9 years agotime.c: use printaddr, printnum_int, and umoven_or_printaddr
Dmitry V. Levin [Thu, 16 Jul 2015 18:18:09 +0000 (18:18 +0000)]
time.c: use printaddr, printnum_int, and umoven_or_printaddr

* time.c (sys_nanosleep): Use printaddr.
(printitv_bitness, tprint_timex32, tprint_timex, printsigevent32,
printsigevent): Use umoven_or_printaddr.
(sys_timer_create): Use printnum_int.
(sys_getitimer, sys_osf_getitimer, sys_setitimer, sys_osf_setitimer,
do_adjtimex, sys_timer_settime, sys_timer_gettime): Remove
redundant checks for syserror.

9 years agosprinttv: do not fetch data in case of syserror
Dmitry V. Levin [Thu, 16 Jul 2015 16:22:07 +0000 (16:22 +0000)]
sprinttv: do not fetch data in case of syserror

* time.c (sprinttv): Do not fetch data in case syserror.
Print address instead of {...} in case of umove failure.
(sys_gettimeofday, sys_osf_gettimeofday, sys_adjtime, sys_clock_gettime,
clock_nanosleep): Remove now redundant checks for syserror.

9 years agotruncate.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 21:29:28 +0000 (21:29 +0000)]
truncate.c: make use of RVAL_DECODED

* truncate.c (sys_truncate, sys_truncate64, sys_ftruncate,
sys_ftruncate64): Update for RVAL_DECODED.

9 years agoumask.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 21:27:12 +0000 (21:27 +0000)]
umask.c: make use of RVAL_DECODED

* umask.c (sys_umask): Update for RVAL_DECODED.

9 years agoumount.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 21:13:27 +0000 (21:13 +0000)]
umount.c: make use of RVAL_DECODED

* umount.c (sys_umount2): Update for RVAL_DECODED.

9 years agoutimes.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 21:21:09 +0000 (21:21 +0000)]
utimes.c: make use of RVAL_DECODED

* utimes.c (decode_utimes): Change to return void.
Update for RVAL_DECODED.
(sys_utimes, sys_futimesat, sys_utimensat, sys_osf_utimes):
Update callers.  Update for RVAL_DECODED.

9 years agotests/uid.test: adopt for alpha
Dmitry V. Levin [Thu, 16 Jul 2015 09:09:11 +0000 (09:09 +0000)]
tests/uid.test: adopt for alpha

Make the test work on alpha that has getxuid syscall instead of getuid.

* tests/uid.awk (BEGIN): Update getuid regexp to match both getuid
and getxuid syscalls.
* tests/uid.c (main): Allow __NR_getxuid as an alternative
to __NR_getuid.
* tests/uid.test: If getuid syscall is not available, probe for
getxuid syscall.

9 years agouid.c: make use of RVAL_DECODED
Dmitry V. Levin [Thu, 16 Jul 2015 00:01:25 +0000 (00:01 +0000)]
uid.c: make use of RVAL_DECODED

* uid.c (sys_setuid, sys_setreuid, sys_setresuid, sys_chown, sys_fchown,
sys_setgroups): Update for RVAL_DECODED.

9 years agouid.c: use printaddr and umoven_or_printaddr
Dmitry V. Levin [Wed, 15 Jul 2015 23:37:31 +0000 (23:37 +0000)]
uid.c: use printaddr and umoven_or_printaddr

* uid.c (get_print_uid): Use umoven_or_printaddr.
(sys_getresuid): Do not check for syserror, get_print_uid now does
the right thing.
(sys_setgroups, sys_getgroups): Add const qualifier to local variables
that are assigned once.  Use printaddr.

9 years agoia64: wire up utimensat syscall
Dmitry V. Levin [Wed, 15 Jul 2015 23:03:15 +0000 (23:03 +0000)]
ia64: wire up utimensat syscall

* linux/ia64/syscallent.h (utimensat): New entry.

9 years agodecode_utimes: enclose timespec array in square brackets
Dmitry V. Levin [Wed, 15 Jul 2015 14:52:47 +0000 (14:52 +0000)]
decode_utimes: enclose timespec array in square brackets

* utimes.c (decode_utimes): enclose timespec array in square brackets
instead of curly brackets.

9 years agouname.c: use umove_or_printaddr
Dmitry V. Levin [Wed, 15 Jul 2015 09:25:34 +0000 (09:25 +0000)]
uname.c: use umove_or_printaddr

* uname.c (sys_uname): Use umove_or_printaddr.

9 years agotests: add utime.test
Dmitry V. Levin [Wed, 15 Jul 2015 09:02:17 +0000 (09:02 +0000)]
tests: add utime.test

* tests/utime.c: New file.
* tests/utime.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add utime.
(TESTS): Add utime.test.
* tests/.gitignore: Add utime.

9 years agoutime.c: make use of RVAL_DECODED
Dmitry V. Levin [Wed, 15 Jul 2015 08:29:56 +0000 (08:29 +0000)]
utime.c: make use of RVAL_DECODED

* utime.c (sys_utime): Update for RVAL_DECODED.

9 years agoutime.c: use umoven_or_printaddr
Dmitry V. Levin [Wed, 15 Jul 2015 08:27:18 +0000 (08:27 +0000)]
utime.c: use umoven_or_printaddr

* utime.c (sys_utime): Use umoven_or_printaddr.

9 years agowait.c: use printaddr and umove_or_printaddr
Dmitry V. Levin [Wed, 15 Jul 2015 00:36:20 +0000 (00:36 +0000)]
wait.c: use printaddr and umove_or_printaddr

* wait.c (waitid): Do not check for NULL the address passed
to printrusage.
(printwaitn): Likewise.
Use printaddr and umove_or_printaddr for fetching wait status.

9 years agowait: move fallback definitions of wait options to xlat/
Dmitry V. Levin [Wed, 15 Jul 2015 00:33:20 +0000 (00:33 +0000)]
wait: move fallback definitions of wait options to xlat/

* wait.c: Move definitions of __W* flags ...
* xlat/wait4_options.in: ... here.

9 years agotests: add xattr.test
Dmitry V. Levin [Wed, 15 Jul 2015 00:09:08 +0000 (00:09 +0000)]
tests: add xattr.test

* tests/xattr.c: New file.
* tests/xattr.expected: Likewise.
* tests/xattr.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add xattr.
(TESTS): Add xattr.test.
(EXTRA_DIST): Add xattr.expected.
* tests/.gitignore: Add xattr.

9 years agoxattr.c: make use of RVAL_DECODED
Dmitry V. Levin [Tue, 14 Jul 2015 23:38:58 +0000 (23:38 +0000)]
xattr.c: make use of RVAL_DECODED

* xattr.c (sys_setxattr, sys_fsetxattr, sys_removexattr,
sys_fremovexattr): Update for RVAL_DECODED.

9 years agoprint_xattr_val: do not fetch data in case of !verbose || syserror
Dmitry V. Levin [Tue, 14 Jul 2015 23:34:06 +0000 (23:34 +0000)]
print_xattr_val: do not fetch data in case of !verbose || syserror

* xattr.c (print_xattr_val): Do not fetch data in case
of !verbose || syserror.   Use printaddr.

9 years agoprint_xattr_list: use printaddr
Dmitry V. Levin [Tue, 14 Jul 2015 23:31:35 +0000 (23:31 +0000)]
print_xattr_list: use printaddr

* xattr.c (print_xattr_list): Use printaddr.

9 years agoprint_xattr_val: remove unused argument
Dmitry V. Levin [Tue, 14 Jul 2015 23:25:15 +0000 (23:25 +0000)]
print_xattr_val: remove unused argument

* xattr.c (print_xattr_val): Remove unused "failed" argument.
(sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Update
all callers.

9 years agoprint_xattr_list: remove redundant address check
Dmitry V. Levin [Tue, 14 Jul 2015 23:27:21 +0000 (23:27 +0000)]
print_xattr_list: remove redundant address check

* xattr.c (print_xattr_list): Do not check for NULL the address passed
to printstr.

9 years agoipc.c: make use of RVAL_DECODED
Dmitry V. Levin [Mon, 13 Jul 2015 21:06:48 +0000 (21:06 +0000)]
ipc.c: make use of RVAL_DECODED

* ipc.c (sys_mq_notify, sys_mq_open, sys_mq_timedreceive,
sys_mq_timedsend, sys_msgctl, sys_msgget, sys_msgsnd, sys_semctl,
sys_semget, sys_semop, sys_semtimedop, sys_shmctl, sys_shmdt,
sys_shmget): Update for RVAL_DECODED.
(sys_shmat): Decode all arguments on entering syscall.

9 years agoumoven_or_printaddr: do not fetch data if not in verbose mode
Dmitry V. Levin [Tue, 14 Jul 2015 22:03:55 +0000 (22:03 +0000)]
umoven_or_printaddr: do not fetch data if not in verbose mode

After this change, umoven_or_printaddr and its callers, including
printnum_* and printpair_*, will not fetch data in !verbose mode.

* util.c (umoven_or_printaddr): Do not call umoven if !verbose.

9 years agoChange printnum_* printers to honor syserror
Dmitry V. Levin [Mon, 13 Jul 2015 20:44:01 +0000 (20:44 +0000)]
Change printnum_* printers to honor syserror

With this change, printnum_* printers will not attempt to fetch data
in case of exiting(tcp) && syserror(tcp).
All "at exiting" decoders that call these printers have been made
ready for this change in previous commits.

* util.c (DEF_PRINTNUM, DEF_PRINTPAIR): Use umove_or_printaddr.
* prctl.c (prctl_exit): Use printnum_int and printnum_long.
(sys_arch_prctl): Do not check for syserror.

9 years agoterm.c: enhance tty ioctl parser
Dmitry V. Levin [Mon, 13 Jul 2015 20:10:20 +0000 (20:10 +0000)]
term.c: enhance tty ioctl parser

Decode as much data on entering syscall as possible.

* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
decode_modem_flags): New functions.
(term_ioctl): Use them.  Update for RVAL_DECODED.

9 years agoChange comparisons with function pointers to comparisons with SENs
Elvira Khabirova [Fri, 10 Jul 2015 19:24:58 +0000 (22:24 +0300)]
Change comparisons with function pointers to comparisons with SENs

* pathtrace.c (pathtrace_match): Change all comparisons with function
pointers to a single SEN based switch.
* syscall.c (dumpio, trace_syscall_entering): Change all comparisons
with function pointers to comparisons with SENs.
* ipc.c (sys_ipc): Remove.
* sock.c (sys_socketcall): Likewise.
* linux/dummy.h (sys_ipc, sys_socketcall): New aliases.

9 years agoAdd unique syscall entry numbers (SENs)
Elvira Khabirova [Fri, 10 Jul 2015 19:24:54 +0000 (22:24 +0300)]
Add unique syscall entry numbers (SENs)

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sen.h.
(syscallent_names, syscallent_patterns, syscallent_files): New variables.
(sen.h): New rule.
* defs.h (struct sysent): Add sen field.
* generate_sen.sh: New file.
* linux/syscall.h: Include "sen.h".
* syscall.c (SEN_NAME): New temporary macro.
(SEN): Use it to prepend syscall entry number.

9 years agoIntroduce SEN macro
Elvira Khabirova [Fri, 10 Jul 2015 19:24:48 +0000 (22:24 +0300)]
Introduce SEN macro

* syscall.c (SEN): New temporary macro.
* linux/dummy.h (sys_printargs): New macro.
* linux/subcall.h: Wrap all sys_func entries using SEN.
* linux/*/syscallent*.h: Likewise.

9 years agoscsi.c: enhance SG_IO ioctl parser
Dmitry V. Levin [Tue, 7 Jul 2015 18:38:07 +0000 (21:38 +0300)]
scsi.c: enhance SG_IO ioctl parser

Fix SG_IO ioctl output in case of failed umove

* scsi.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
Update for RVAL_DECODED.
(print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
print_sg_io_v4_res): Do not print address in case of failed umove.
(scsi_ioctl): Use printaddr.

9 years agoptp.c: enhance ptp ioctl parser
Dmitry V. Levin [Tue, 7 Jul 2015 09:47:18 +0000 (12:47 +0300)]
ptp.c: enhance ptp ioctl parser

* ptp.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
Update for RVAL_DECODED.
(ptp_ioctl): Use umove_or_printaddr.