]> granicus.if.org Git - strace/log
strace
7 years agortc: change type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 13:23:35 +0000 (13:23 +0000)]
rtc: change type of ioctl 3rd argument from long to kernel_ureg_t

* rtc.c (decode_rtc_time, decode_rtc_wkalrm, decode_rtc_pll_info):
Change addr type from long to kernel_ureg_t.
(rtc_ioctl): Change arg type from long to kernel_ureg_t.

7 years agomtd: change type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 13:19:48 +0000 (13:19 +0000)]
mtd: change type of ioctl 3rd argument from long to kernel_ureg_t

* mtd.c (decode_erase_info_user, decode_erase_info_user64,
decode_mtd_oob_buf, decode_mtd_oob_buf64, decode_otp_info,
decode_otp_select, decode_mtd_write_req, decode_mtd_info_user,
decode_nand_oobinfo, decode_nand_ecclayout_user, decode_mtd_ecc_stats):
Change addr type from long to kernel_ureg_t.
(mtd_ioctl): Change arg type from long to kernel_ureg_t.

7 years agohdio: change type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 13:18:12 +0000 (13:18 +0000)]
hdio: change type of ioctl 3rd argument from long to kernel_ureg_t

* hdio.c (hdio_ioctl): Change arg type from long to kernel_ureg_t.

7 years agov4l2: change type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 01:22:18 +0000 (01:22 +0000)]
v4l2: change type of ioctl 3rd argument from long to kernel_ureg_t

* v4l2.c (print_v4l2_capability, print_v4l2_fmtdesc, print_v4l2_format,
print_v4l2_requestbuffers, print_v4l2_buffer, print_v4l2_framebuffer,
print_v4l2_buf_type, print_v4l2_streamparm, print_v4l2_standard,
print_v4l2_input, print_v4l2_control, print_v4l2_queryctrl,
print_v4l2_cropcap, print_v4l2_crop, print_v4l2_ext_controls,
print_v4l2_frmsizeenum, print_v4l2_frmivalenum,
print_v4l2_create_buffers, v4l2_ioctl): Change arg type from long
to kernel_ureg_t.

7 years agoevdev: change type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 03:03:09 +0000 (03:03 +0000)]
evdev: change type of ioctl 3rd argument from long to kernel_ureg_t

* evdev.c (ff_effect_ioctl, abs_ioctl, keycode_ioctl, keycode_V2_ioctl,
getid_ioctl, decode_bitset, mtslots_ioctl, repeat_ioctl, bit_ioctl,
evdev_read_ioctl, evdev_write_ioctl, evdev_ioctl): Change arg type
from long to kernel_ureg_t.

7 years agobtrfs: change type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 03:03:09 +0000 (03:03 +0000)]
btrfs: change type of ioctl 3rd argument from long to kernel_ureg_t

* btrfs.c (btrfs_print_balance, btrfs_ioctl): Change arg type from long
to kernel_ureg_t.

7 years agoblock: change type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 03:03:09 +0000 (03:03 +0000)]
block: change type of ioctl 3rd argument from long to kernel_ureg_t

* block.c (block_ioctl): Change arg type from long to kernel_ureg_t.

7 years agoChange type of ioctl 3rd argument from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 03:03:09 +0000 (03:03 +0000)]
Change type of ioctl 3rd argument from long to kernel_ureg_t

* defs.h (DECL_IOCTL): Change arg type from long to kernel_ureg_t.
* dm.c (dm_known_ioctl, dm_ioctl): Likewise.
* file_ioctl.c (file_ioctl): Likewise.
* fs_x_ioctl.c (fs_x_ioctl): Likewise.
* ioctl.c (ioctl_decode): Likewise.
* loop.c (decode_loop_info, decode_loop_info64): Change addr type
from long to kernel_ureg_t.
(loop_ioctl): Change arg type from long to kernel_ureg_t.
* ptp.c (ptp_ioctl): Likewise.
* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
print_sg_io_v4_res, scsi_ioctl): Likewise.
* sock.c (print_ifreq, sock_ioctl): Likewise.
(decode_ifconf): Change addr type from long to kernel_ureg_t.
* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
decode_modem_flags): Likewise.
(term_ioctl): Change arg type from long to kernel_ureg_t.
* ubi.c (ubi_ioctl): Likewise.
* userfaultfd.c (uffdio_ioctl): Likewise.

7 years agoldt: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 18:21:26 +0000 (18:21 +0000)]
ldt: change address argument type from long to kernel_ureg_t

* defs.h [HAVE_STRUCT_USER_DESC] (print_user_desc): Change address
argument type from long to kernel_ureg_t.
* ldt.c [HAVE_STRUCT_USER_DESC] (print_user_desc): Likewise.

7 years agofcntl: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:13:18 +0000 (21:13 +0000)]
fcntl: change address argument type from long to kernel_ureg_t

* fcntl.c (printflock64, printflock, print_f_owner_ex): Change
address argument type from long to kernel_ureg_t.

7 years agoexecve: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:06:58 +0000 (21:06 +0000)]
execve: change address argument type from long to kernel_ureg_t

* execve.c (printargv, printargc): Change address argument type
from long to kernel_ureg_t.

7 years agodirent: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:05:23 +0000 (21:05 +0000)]
dirent: change address argument type from long to kernel_ureg_t

* dirent.c (print_old_dirent): Change address argument type from long
to kernel_ureg_t.

7 years agobpf: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 02:43:47 +0000 (02:43 +0000)]
bpf: change address argument type from long to kernel_ureg_t

* bpf.c (bpf_map_create, bpf_map_update_elem, bpf_map_delete_elem,
bpf_map_io, bpf_prog_load, SYS_FUNC(bpf)): Change address argument
type from long to kernel_ureg_t.

7 years agodump*: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
dump*: change address argument type from long to kernel_ureg_t

* defs.h (dumpiov_in_msghdr, dumpiov_in_mmsghdr, dumpiov_upto, dumpstr):
Change address argument type from long to kernel_ureg_t.
* mmsghdr.c (dumpiov_in_mmsghdr): Likewise.
* msghdr.c (fetch_msghdr_namelen, decode_msghdr, dumpiov_in_msghdr):
Likewise.
* util.c (dumpiov_upto, dumpstr): Likewise.

7 years agoprint_sigset_addr_len: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 23:30:54 +0000 (23:30 +0000)]
print_sigset_addr_len: change address argument type from long to kernel_ureg_t

* defs.h (print_sigset_addr_len) Change address argument type from long
to kernel_ureg_t.
* signal.c (print_sigset_addr_len_limit, print_sigset_addr_len,
decode_old_sigaction, decode_new_sigaction): Likewise.

7 years agodecode_sockaddr: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 23:22:21 +0000 (23:22 +0000)]
decode_sockaddr: change address argument type from long to kernel_ureg_t

* defs.h (decode_sockaddr) Change tracee address argument type from long
to kernel_ureg_t.
* sockaddr.c (decode_sockaddr): Likewise.

7 years agoprint_struct_statfs*: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 23:07:13 +0000 (23:07 +0000)]
print_struct_statfs*: change address argument type from long to kernel_ureg_t

* defs.h (print_struct_statfs, print_struct_statfs64): Change address
argument type from long to kernel_ureg_t.
* print_statfs.c (print_struct_statfs, print_struct_statfs64): Likewise.
* fetch_struct_statfs.c (fetch_struct_statfs, fetch_struct_statfs64):
Likewise.

7 years agofetch_struct_flock: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:15:59 +0000 (21:15 +0000)]
fetch_struct_flock: change address argument type from long to kernel_ureg_t

* fetch_struct_flock.c (fetch_struct_flock, fetch_struct_flock64):
Change address argument type from long to kernel_ureg_t.

7 years agofetch_seccomp_fprog: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 15:29:21 +0000 (15:29 +0000)]
fetch_seccomp_fprog: change address argument type from long to kernel_ureg_t

* fetch_seccomp_fprog.c (fetch_seccomp_fprog): Change address argument
type from long to kernel_ureg_t.

7 years agoprintnum_*, printpair_*: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 22:33:52 +0000 (22:33 +0000)]
printnum_*, printpair_*: change address argument type from long to kernel_ureg_t

* defs.h (DECL_PRINTNUM, DECL_PRINTPAIR, printnum_long_int): Change
address argument type from long to kernel_ureg_t.
* util.c (DEF_PRINTNUM, DEF_PRINTPAIR, printnum_long_int): Likewise.

7 years agoprintpath*: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 22:06:34 +0000 (22:06 +0000)]
printpath*: change address argument type from long to kernel_ureg_t

* defs.h (printpath, printpathn): Change address argument type
from long to kernel_ureg_t.
* util.c (printpath, printpathn): Likewise.

7 years agoprintstr*: change address argument type from long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 21:59:24 +0000 (21:59 +0000)]
printstr*: change address argument type from long to kernel_ureg_t

* defs.h (printstr_ex, printstr_ex): Change address argument type
from long to kernel_ureg_t.
* util.c (printstr_ex): Likewise.

7 years agoumove*: change tracee address argument type from long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 21:23:39 +0000 (21:23 +0000)]
umove*: change tracee address argument type from long to kernel_ureg_t

* defs.h (umovestr, umoven, umoven_or_printaddr,
umoven_or_printaddr_ignore_syserror): Change tracee address argument
type from long to kernel_ureg_t.
(print_array): Change the type of tracee address argument of umoven_func
from long to kernel_ureg_t.
* util.c (vm_read_mem, umovestr, umoven, umoven_or_printaddr,
umoven_or_printaddr_ignore_syserror): Change tracee address argument
type from long to kernel_ureg_t.
(print_array): Change the type of tracee address argument of umoven_func
from long to kernel_ureg_t.
* desc.c (umove_kulong_array_or_printaddr): Change tracee address
argument type from long to kernel_ureg_t.
* mmsghdr.c (fetch_struct_mmsghdr_or_printaddr): Likewise.

7 years agofutex: change address type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:33:03 +0000 (21:33 +0000)]
futex: change address type from long to kernel_ureg_t

* futex.c (SYS_FUNC(futex)): Change address type from long
to kernel_ureg_t.

7 years agofile_handle: change address type from long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:29:38 +0000 (21:29 +0000)]
file_handle: change address type from long to kernel_ureg_t

* file_handle.c (SYS_FUNC(name_to_handle_at),
SYS_FUNC(open_by_handle_at)): Change address type from long
to kernel_ureg_t.

7 years agoprintsiginfo: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Sun, 25 Dec 2016 02:49:58 +0000 (02:49 +0000)]
printsiginfo: cast pointers to kernel_ureg_t instead of unsigned long

* printsiginfo.c (printsigval): Cast siginfo.si_ptr pointer
to kernel_ureg_t instead of unsigned long.
(print_si_info): Cast siginfo.si_addr and siginfo.si_call_addr pointers
to kernel_ureg_t instead of unsigned long.

7 years agosigaltstack: cast pointers and sizes to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Sun, 25 Dec 2016 02:30:12 +0000 (02:30 +0000)]
sigaltstack: cast pointers and sizes to kernel_ureg_t instead of unsigned long

* sigaltstack.c (print_stack_t): Cast sigaltstack.ss_sp pointer
and sigaltstack.ss_size to kernel_ureg_t instead of unsigned long.

7 years agov4l2: cast pointers to kernel_ureg_t instead of long
Dmitry V. Levin [Sat, 24 Dec 2016 14:22:19 +0000 (14:22 +0000)]
v4l2: cast pointers to kernel_ureg_t instead of long

* v4l2.c (print_v4l2_ext_control): Cast v4l2_ext_control.string pointer
to kernel_ureg_t instead of long.

7 years agov4l2: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Sun, 25 Dec 2016 02:14:49 +0000 (02:14 +0000)]
v4l2: cast pointers to kernel_ureg_t instead of unsigned long

* v4l2.c (print_v4l2_buffer): Remove redundant cast.
(print_v4l2_framebuffer): Cast v4l2_framebuffer.base pointer
to kernel_ureg_t instead of unsigned long.
(print_v4l2_ext_controls): Cast v4l2_ext_controls.controls pointer
to kernel_ureg_t instead of unsigned long.

7 years agosysctl: cast pointers to kernel_ureg_t instead of size_t
Dmitry V. Levin [Fri, 23 Dec 2016 23:49:55 +0000 (23:49 +0000)]
sysctl: cast pointers to kernel_ureg_t instead of size_t

* sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldval and
__sysctl_args.newval pointers to kernel_ureg_t instead of size_t.

7 years agosysctl: cast pointers to kernel_ureg_t instead of long
Dmitry V. Levin [Fri, 23 Dec 2016 23:43:53 +0000 (23:43 +0000)]
sysctl: cast pointers to kernel_ureg_t instead of long

* sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldlenp pointer
to kernel_ureg_t instead of long.

7 years agoblock: cast pointers to kernel_ureg_t instead of long
Dmitry V. Levin [Wed, 21 Dec 2016 13:54:49 +0000 (13:54 +0000)]
block: cast pointers to kernel_ureg_t instead of long

* block.c (print_blkpg_req): Cast blkpg_ioctl_arg.data pointer
to kernel_ureg_t instead of long.

7 years agodumpiov_upto: cast pointers to kernel_ureg_t instead of long
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
dumpiov_upto: cast pointers to kernel_ureg_t instead of long

* util.c  (dumpiov_upto): Cast iovec.iov_base pointer to kernel_ureg_t
instead of long.

7 years agomsghdr: cast pointers to kernel_ureg_t instead of long
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
msghdr: cast pointers to kernel_ureg_t instead of long

* msghdr.c (print_struct_msghdr): Cast msghdr.msg_name pointer
to kernel_ureg_t instead of long.
(dumpiov_in_msghdr): Cast msghdr.msg_iov pointer to kernel_ureg_t
instead of long.

7 years agommsghdr: cast pointers to kernel_ureg_t instead of long
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
mmsghdr: cast pointers to kernel_ureg_t instead of long

* mmsghdr.c (dumpiov_in_mmsghdr): Cast msghdr.msg_iov pointer
to kernel_ureg_t instead of long.

7 years agoRemove redundant casts of ptrace arguments
Dmitry V. Levin [Fri, 23 Dec 2016 23:33:40 +0000 (23:33 +0000)]
Remove redundant casts of ptrace arguments

* strace.c (maybe_switch_tcbs, trace): Do not cast ptrace 4th argument
from pointer to long type.

7 years agoptrace_restart: cleanup
Dmitry V. Levin [Fri, 23 Dec 2016 23:39:35 +0000 (23:39 +0000)]
ptrace_restart: cleanup

* strace.c (ptrace_restart): Replace the sequence of "if" statements
with a "switch" statement.

7 years agoptrace_restart: change types of integer arguments to unsigned
Dmitry V. Levin [Fri, 23 Dec 2016 23:30:33 +0000 (23:30 +0000)]
ptrace_restart: change types of integer arguments to unsigned

* strace.c (ptrace_restart): Change types of "op" and "sig"
from int to unsigned int.

7 years agoprocess: remove redundant syserror checks
Dmitry V. Levin [Fri, 23 Dec 2016 23:05:46 +0000 (23:05 +0000)]
process: remove redundant syserror checks

* process.c (SYS_FUNC(ptrace)): Remove syserror checks as both
print_siginfo_array and print_seccomp_fprog do the right thing
by using umoven_or_printaddr.

7 years agosparc64: remove redundant casts
Dmitry V. Levin [Sat, 24 Dec 2016 14:19:14 +0000 (14:19 +0000)]
sparc64: remove redundant casts

* linux/sparc64/get_syscall_args.c (get_syscall_args): Remove
redundant casts from uint32_t to long.

7 years agonuma: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Fri, 23 Dec 2016 19:59:46 +0000 (19:59 +0000)]
numa: change address argument type from unsigned long to kernel_ureg_t

* numa.c (print_nodemask): Change address argument type from
unsigned long to kernel_ureg_t.

7 years agonet: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Fri, 23 Dec 2016 10:47:36 +0000 (10:47 +0000)]
net: change address argument type from unsigned long to kernel_ureg_t

* net.c (fetch_socklen): Change address argument type from
unsigned long to kernel_ureg_t.

7 years agomem: change tracee address type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Fri, 23 Dec 2016 12:45:03 +0000 (12:45 +0000)]
mem: change tracee address type from unsigned long to kernel_ureg_t

* mem.c (print_mmap, SYS_FUNC(remap_file_pages),
SYS_FUNC(subpage_prot)): Change the type of variables containing tracee
addresses from unsigned long to kernel_ureg_t.

7 years agokexec: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Fri, 23 Dec 2016 01:18:15 +0000 (01:18 +0000)]
kexec: change address argument type from unsigned long to kernel_ureg_t

* kexec.c (print_kexec_segments): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agopoll: change counter type from unsigned long to unsigned int
Dmitry V. Levin [Thu, 22 Dec 2016 17:59:19 +0000 (17:59 +0000)]
poll: change counter type from unsigned long to unsigned int

* poll.c (decode_poll_exiting): Change the type of printed and
max_printed counters from unsigned long to unsigned int.

7 years agoxattr: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 20:54:10 +0000 (20:54 +0000)]
xattr: change address argument type from unsigned long to kernel_ureg_t

* xattr.c (print_xattr_val, print_xattr_list): Change address
argument type from unsigned long to kernel_ureg_t.

7 years agouid: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 20:53:16 +0000 (20:53 +0000)]
uid: change address argument type from unsigned long to kernel_ureg_t

* uid.c (print_groups): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agostat64: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 20:50:45 +0000 (20:50 +0000)]
stat64: change address argument type from unsigned long to kernel_ureg_t

* stat64.c (decode_struct_stat64): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agostat: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 20:50:13 +0000 (20:50 +0000)]
stat: change address argument type from unsigned long to kernel_ureg_t

* stat.c (decode_struct_stat): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agosigaltstack: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 20:49:04 +0000 (20:49 +0000)]
sigaltstack: change address argument type from unsigned long to kernel_ureg_t

* sigaltstack.c (print_stack_t): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agoresource: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 20:46:16 +0000 (20:46 +0000)]
resource: change address argument type from unsigned long to kernel_ureg_t

* resource.c (print_rlimit64, print_rlimit32, decode_rlimit): Change
address argument type from unsigned long to kernel_ureg_t.

7 years agoprintsiginfo: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 20:44:44 +0000 (20:44 +0000)]
printsiginfo: change address argument type from unsigned long to kernel_ureg_t

* printsiginfo.c (print_siginfo_array): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agopoll: change tracee address type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 16:56:14 +0000 (16:56 +0000)]
poll: change tracee address type from unsigned long to kernel_ureg_t

* poll.c (decode_poll_entering, decode_poll_exiting): Change the type
all tracee address variables from unsigned long to kernel_ureg_t.

7 years agoperf: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 02:50:05 +0000 (02:50 +0000)]
perf: change address argument type from unsigned long to kernel_ureg_t

* perf.c (fetch_perf_event_attr, print_perf_event_attr): Change
address argument type from unsigned long to kernel_ureg_t.

7 years agopathtrace: change tracee address type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Thu, 22 Dec 2016 02:43:57 +0000 (02:43 +0000)]
pathtrace: change tracee address type from unsigned long to kernel_ureg_t

* pathtrace.c (upathmatch): Change address argument type
from unsigned long to kernel_ureg_t.
(pathtrace_match): Change the type of all tracee address variables
from unsigned long to kernel_ureg_t.

7 years agoscsi: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 03:03:09 +0000 (03:03 +0000)]
scsi: change address argument type from unsigned long to kernel_ureg_t

* scsi.c (print_sg_io_buffer): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agodm: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 03:03:09 +0000 (03:03 +0000)]
dm: change address argument type from unsigned long to kernel_ureg_t

* dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps,
dm_decode_dm_name_list, dm_decode_dm_target_versions,
dm_decode_dm_target_msg, dm_decode_string): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agooldstat: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:39:15 +0000 (21:39 +0000)]
oldstat: change address argument type from unsigned long to kernel_ureg_t

* oldstat.c (print_old_kernel_stat): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agocapability: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 17:08:17 +0000 (17:08 +0000)]
capability: change address argument type from unsigned long to kernel_ureg_t

* capability.c (get_cap_header, print_cap_header, print_cap_data):
Change address argument type from unsigned long to kernel_ureg_t.

7 years agobtrfs: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 17:00:44 +0000 (17:00 +0000)]
btrfs: change address argument type from unsigned long to kernel_ureg_t

* btrfs.c (btrfs_print_qgroup_inherit): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agoaffinity: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 02:10:53 +0000 (02:10 +0000)]
affinity: change address argument type from unsigned long to kernel_ureg_t

* affinity.c (print_affinitylist): Change address argument type from
unsigned long to kernel_ureg_t.

7 years agoaio: change address type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 02:25:37 +0000 (02:25 +0000)]
aio: change address type from unsigned long to kernel_ureg_t

* aio.c (print_iocb): Remove casts to unsigned long.
(print_iocbp,  SYS_FUNC(io_submit)): Change address type
from unsigned long to kernel_ureg_t.

7 years agommsghdr: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
mmsghdr: change address argument type from unsigned long to kernel_ureg_t

* mmsghdr.c (save_mmsgvec_namelen, decode_mmsgvec): Change
address argument type from unsigned long to kernel_ureg_t.

7 years agomsghdr: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
msghdr: change address argument type from unsigned long to kernel_ureg_t

* msghdr.c (decode_msg_control): Change address argument type
from unsigned long to kernel_ureg_t.

7 years agofetch_struct_stat64: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:22:25 +0000 (21:22 +0000)]
fetch_struct_stat64: change address argument type from unsigned long to kernel_ureg_t

* fetch_struct_stat64.c (fetch_struct_stat64): Change address argument
type from unsigned long to kernel_ureg_t.

7 years agofetch_struct_stat: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 21:21:20 +0000 (21:21 +0000)]
fetch_struct_stat: change address argument type from unsigned long to kernel_ureg_t

* fetch_struct_stat.c (fetch_struct_stat): Change address argument
type from unsigned long to kernel_ureg_t.

7 years agofetch_struct_msghdr: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
fetch_struct_msghdr: change address argument type from unsigned long to kernel_ureg_t

* fetch_struct_msghdr.c (fetch_struct_msghdr): Change
address argument type from unsigned long to kernel_ureg_t.

7 years agofetch_struct_mmsghdr: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Wed, 21 Dec 2016 15:36:50 +0000 (15:36 +0000)]
fetch_struct_mmsghdr: change address argument type from unsigned long to kernel_ureg_t

* fetch_struct_mmsghdr.c (fetch_struct_mmsghdr): Change
address argument type from unsigned long to kernel_ureg_t.

7 years agodecode_netlink: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 23:16:25 +0000 (23:16 +0000)]
decode_netlink: change address argument type from unsigned long to kernel_ureg_t

* defs.h (decode_netlink) Change address argument type
from unsigned long to kernel_ureg_t.
* netlink.c (fetch_nlmsghdr, decode_nlmsghdr_with_payload,
decode_netlink): Likewise.

7 years agoprint_seccomp_*: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 22:54:53 +0000 (22:54 +0000)]
print_seccomp_*: change address argument type from unsigned long to kernel_ureg_t

* defs.h (print_seccomp_filter, print_seccomp_fprog): Change
address argument type from unsigned long to kernel_ureg_t.
* seccomp.c (print_seccomp_filter, print_seccomp_fprog,
decode_seccomp_set_mode_strict): Likewise.

7 years agotprint_iov*: change address argument type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 22:47:02 +0000 (22:47 +0000)]
tprint_iov*: change address argument type from unsigned long to kernel_ureg_t

* defs.h (tprint_iov, tprint_iov_upto): Change address argument type
from unsigned long to kernel_ureg_t.
* io.c (tprint_iov, tprint_iov_upto): Likewise.

7 years agoprint_array: change tracee address type from unsigned long to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 21:46:10 +0000 (21:46 +0000)]
print_array: change tracee address type from unsigned long to kernel_ureg_t

* defs.h (print_array): Change start_addr type from unsigned long
to kernel_ureg_t.
* util.c (print_array): Likewise.  Change the type of all tracee
address variables from unsigned long to kernel_ureg_t.

7 years agoRename LONG_LONG to ULONG_LONG and change it to return unsigned long long
Dmitry V. Levin [Fri, 23 Dec 2016 19:12:38 +0000 (19:12 +0000)]
Rename LONG_LONG to ULONG_LONG and change it to return unsigned long long

In all places where LONG_LONG is used the destination already has type
unsigned long long, so it is quite natural to change LONG_LONG as well.

* defs.h (LONG_LONG): Rename to ULONG_LONG, change return type
from long long to unsigned long long.  All callers updated.

7 years agomem: remove redundant casts
Dmitry V. Levin [Fri, 23 Dec 2016 11:16:11 +0000 (11:16 +0000)]
mem: remove redundant casts

* mem.c (SYS_FUNC(old_mmap)): Remove redundant cast
from kernel_ureg_t to unsigned long.
[S390] (SYS_FUNC(old_mmap_pgoff)): Remove redundant cast
from unsigned int to unsigned long.

7 years agodesc: remove redundant casts
Dmitry V. Levin [Thu, 22 Dec 2016 23:36:32 +0000 (23:36 +0000)]
desc: remove redundant casts

* desc.c (umove_kulong_array_or_printaddr): Remove redundant cast
from uint32_t to kernel_ulong_t.
(SYS_FUNC(pselect6)): Remove redundant casts from kernel_ulong_t
to unsigned long.

7 years agoprint_sigevent: remove redundant cast
Dmitry V. Levin [Thu, 22 Dec 2016 17:07:24 +0000 (17:07 +0000)]
print_sigevent: remove redundant cast

* print_sigevent.c (print_sigevent): Remove redundant cast from
struct_sigevent.sigev_value.sival_ptr to unsigned long as the former
is not a pointer but an unsigned integer.

7 years agotests: fix xattr.test for the case when listxattr returns a long list
Dmitry V. Levin [Thu, 22 Dec 2016 22:34:23 +0000 (22:34 +0000)]
tests: fix xattr.test for the case when listxattr returns a long list

* tests/xattr.c (DEFAULT_STRLEN): New macro.
(main): Use it to limit the length passed to print_quoted_memory.
Print ellipsis when the list returned by listxattr is too long.

7 years agotests: test for correct ellipsis with -s in xattr
Gabriel Laskar [Thu, 22 Dec 2016 15:10:52 +0000 (16:10 +0100)]
tests: test for correct ellipsis with -s in xattr

* tests/xattr-strings.c: New file.
* tests/xattr-strings.test: New test.
* tests/.gitignore: Add xattr-string.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add xattr-string.test.

Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
7 years agoxattr: use printstr_ex instead of print_quoted_string
Gabriel Laskar [Thu, 22 Dec 2016 15:10:51 +0000 (16:10 +0100)]
xattr: use printstr_ex instead of print_quoted_string

This fixes the display when using `-s` to limit the string size
of the values displayed by {get,set}xattr.

* xattr.c (print_xattr_val): Remove static buffer.  Use printstr_ex
instead of print_quoted_string.

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
7 years agotests: use scno.h in finit_module, kcmp, renameat2 tests
Eugene Syromyatnikov [Tue, 20 Dec 2016 23:49:04 +0000 (02:49 +0300)]
tests: use scno.h in finit_module, kcmp, renameat2 tests

* tests/finit_module.c: Include "scno.h".
* tests/kcmp.c: Likewise.
* tests/renameat2.c: Likewise.

7 years agosock: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Wed, 21 Dec 2016 14:12:17 +0000 (14:12 +0000)]
sock: cast pointers to kernel_ureg_t instead of unsigned long

* sock.c (decode_ifconf): Cast ifconf.ifc_buf pointer to kernel_ureg_t
instead of unsigned long.

7 years agoscsi: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Wed, 21 Dec 2016 13:59:02 +0000 (13:59 +0000)]
scsi: cast pointers to kernel_ureg_t instead of unsigned long

* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res): Cast sg_io_hdr.cmdp,
sg_io_hdr.dxferp, and sg_io_hdr.sbp pointers to kernel_ureg_t instead
of unsigned long.

7 years agomtd: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Wed, 21 Dec 2016 16:38:02 +0000 (16:38 +0000)]
mtd: cast pointers to kernel_ureg_t instead of unsigned long

* mtd.c (decode_mtd_oob_buf): Cast mtd_oob_buf.ptr pointer
to kernel_ureg_t instead of unsigned long.

7 years agomsghdr: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Wed, 21 Dec 2016 00:04:06 +0000 (00:04 +0000)]
msghdr: cast pointers to kernel_ureg_t instead of unsigned long

* msghdr.c (print_struct_msghdr): Cast msghdr.msg_iov and
msghdr.msg_control pointers to kernel_ureg_t instead of unsigned long.

7 years agoevdev: cast tcp->u_rval to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Wed, 21 Dec 2016 14:12:17 +0000 (14:12 +0000)]
evdev: cast tcp->u_rval to kernel_ureg_t instead of unsigned long

* evdev.c (decode_bitset): Cast tcp->u_rval to kernel_ureg_t
instead of unsigned long.

7 years agoevdev: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Wed, 21 Dec 2016 13:13:08 +0000 (13:13 +0000)]
evdev: cast pointers to kernel_ureg_t instead of unsigned long

* evdev.c (ff_effect_ioctl): Cast ff_periodic_effect.custom_data
pointer to kernel_ureg_t instead of unsigned long.

7 years agobtrfs: cast pointers to kernel_ureg_t instead of unsigned long
Dmitry V. Levin [Wed, 21 Dec 2016 13:11:11 +0000 (13:11 +0000)]
btrfs: cast pointers to kernel_ureg_t instead of unsigned long

* btrfs.c (btrfs_ioctl): Cast btrfs_ioctl_send_args.clone_sources
and btrfs_ioctl_vol_args_v2.qgroup_inherit pointers to kernel_ureg_t
instead of unsigned long.

7 years agoRework ifdefery around print_user_desc
Dmitry V. Levin [Wed, 21 Dec 2016 18:01:21 +0000 (18:01 +0000)]
Rework ifdefery around print_user_desc

* configure.ac (AC_CHECK_TYPES): Check for struct user_desc
in <asm/ldt.h>.
* clone.c (print_tls_arg): New function.
(SYS_FUNC(clone)): Use it.
(print_user_desc): Move prototype ...
* defs.h [HAVE_STRUCT_USER_DESC]: ... here.
* ldt.c: Check for HAVE_STRUCT_USER_DESC instead of architectures.
* linux/dummy.h: Likewise.

7 years agoIntroduce DECL_IOCTL macro to declare *_ioctl functions
Dmitry V. Levin [Wed, 21 Dec 2016 00:21:10 +0000 (00:21 +0000)]
Introduce DECL_IOCTL macro to declare *_ioctl functions

* defs.h (DECL_IOCTL): New macro.
(dm_ioctl, file_ioctl, fs_x_ioctl, loop_ioctl, ptp_ioctl, scsi_ioctl,
sock_ioctl, term_ioctl, ubi_ioctl, uffdio_ioctl): Rewrite prototypes
using DECL_IOCTL.

7 years agoIntroduce DECL_PRINT* macros to declare printnum_* and printpair_*
Dmitry V. Levin [Tue, 20 Dec 2016 22:28:20 +0000 (22:28 +0000)]
Introduce DECL_PRINT* macros to declare printnum_* and printpair_*

* defs.h (DECL_PRINTNUM, DECL_PRINTPAIR): New macros.
(printnum_short, printnum_int, printnum_int64): Rewrite prototypes
using DECL_PRINTNUM.
(printpair_int, printpair_int64): Rewrite prototypes
using DECL_PRINTPAIR.

7 years agoioctl: use uintptr_t for casts between 32-bit integers and pointers
Dmitry V. Levin [Wed, 21 Dec 2016 00:26:06 +0000 (00:26 +0000)]
ioctl: use uintptr_t for casts between 32-bit integers and pointers

* ioctl.c (compare): Cast pointer to uintptr_t before assigning
it to an integer.
(ioctl_lookup): Cast integer to uintptr_t before passing it
as a pointer.

7 years agoscsi: use umove_or_printaddr
Dmitry V. Levin [Wed, 21 Dec 2016 00:37:57 +0000 (00:37 +0000)]
scsi: use umove_or_printaddr

* scsi.c (scsi_ioctl): Use umove_or_printaddr.

7 years agoRemove dumpiov wrapper
Dmitry V. Levin [Wed, 21 Dec 2016 02:16:35 +0000 (02:16 +0000)]
Remove dumpiov wrapper

* defs.h (dumpiov): Remove.
* syscall.c (dumpio): Use dumpiov_upto instead of dumpiov.

7 years agotravis: fix enabling of gcc -Werror builds
Dmitry V. Levin [Wed, 21 Dec 2016 22:20:29 +0000 (22:20 +0000)]
travis: fix enabling of gcc -Werror builds

* travis-build.sh: Use DISTCHECK_CONFIGURE_FLAGS instead
of CHECK_CONFIGURE_FLAGS and ENABLE_GCC_WERROR.
[$CC == gcc]: Add --enable-gcc-Werror to DISTCHECK_CONFIGURE_FLAGS
instead of ENABLE_GCC_WERROR.
[$CHECK == coverage]: Add --enable-code-coverage
to DISTCHECK_CONFIGURE_FLAGS instead of CHECK_CONFIGURE_FLAGS.

7 years agoprintaddr: change argument type to kernel_ureg_t
Dmitry V. Levin [Tue, 20 Dec 2016 15:10:48 +0000 (15:10 +0000)]
printaddr: change argument type to kernel_ureg_t

* defs.h (printaddr): Change argument type from unsigned long
to kernel_ureg_t.

7 years agotests: check decoding of unreadable ip_mreq and ipv6_mreq structures
Dmitry V. Levin [Tue, 20 Dec 2016 20:19:35 +0000 (20:19 +0000)]
tests: check decoding of unreadable ip_mreq and ipv6_mreq structures

* tests/ip_mreq.c (main): Check short read.

7 years agotests: rewrite ip_mreq.c using arrays and iterators
Dmitry V. Levin [Tue, 20 Dec 2016 20:17:18 +0000 (20:17 +0000)]
tests: rewrite ip_mreq.c using arrays and iterators

* tests/ip_mreq.c (main): Create arrays of setsockopt arguments to test.
Iterate over these arrays invoking setsockopt and printing expected
output.

7 years agotests: rewrite ip_mreq.c using tail_alloc
Dmitry V. Levin [Tue, 20 Dec 2016 20:13:18 +0000 (20:13 +0000)]
tests: rewrite ip_mreq.c using tail_alloc

* tests/ip_mreq.c (main): Allocate objects of struct ip_mreq
and struct ipv6_mreq using tail_alloc instead of using stack.

7 years agotests: rewrite ip_mreq.c without asserts
Dmitry V. Levin [Tue, 20 Dec 2016 17:55:04 +0000 (17:55 +0000)]
tests: rewrite ip_mreq.c without asserts

* tests/ip_mreq.c: Do not include <assert.h>.
(main): Do not use assert.  Use sprintrc instead of errno2name.

7 years agoRemove NEED_PTRACE_PROTOTYPE_WORKAROUND
Dmitry V. Levin [Tue, 20 Dec 2016 14:58:57 +0000 (14:58 +0000)]
Remove NEED_PTRACE_PROTOTYPE_WORKAROUND

Remove the workaround for broken ptrace prototypes
that seems to be unneeded for quite a long time.

* defs.h [NEED_PTRACE_PROTOTYPE_WORKAROUND]: Remove.