4955 Commits

Author SHA1 Message Date
b89258dcdd 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.
2016-12-23 19:26:58 +00:00
8dbcedef30 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.
2016-12-23 19:26:58 +00:00
6f3abb076c 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.
2016-12-23 19:26:58 +00:00
c9e380bb6c 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.
2016-12-23 19:26:58 +00:00
6f6d3e4c60 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.
2016-12-23 19:26:58 +00:00
cc6ef2f922 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.
2016-12-23 19:26:58 +00:00
831feaf212 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.
2016-12-23 19:26:58 +00:00
a011ab10af 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.
2016-12-23 19:26:58 +00:00
30d13975a4 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.
2016-12-23 19:26:58 +00:00
c15071b535 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.
2016-12-23 19:26:58 +00:00
5d0e737d00 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.
2016-12-23 19:26:58 +00:00
4c7a353896 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.
2016-12-23 19:26:58 +00:00
f070096094 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.
2016-12-23 19:26:58 +00:00
173164923e 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.
2016-12-23 19:26:58 +00:00
edfeca944a 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.
2016-12-23 19:26:58 +00:00
5615c15036 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.
2016-12-23 19:26:57 +00:00
d4bb4510ba 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.
2016-12-23 19:26:57 +00:00
2b60571d86 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.
2016-12-23 19:26:57 +00:00
8bb5c14488 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.
2016-12-23 19:26:57 +00:00
dc788de4e0 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.
2016-12-23 19:26:57 +00:00
50d25d1a60 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.
2016-12-23 19:26:57 +00:00
826dd22e46 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.
2016-12-23 19:26:57 +00:00
5607a0e2b0 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.
2016-12-23 19:26:57 +00:00
f806439e29 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.
2016-12-23 19:26:57 +00:00
b6b3dc4361 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.
2016-12-23 19:26:57 +00:00
fde482b82e 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.
2016-12-23 19:26:57 +00:00
5c252f970d 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.
2016-12-23 19:26:57 +00:00
399fceeb06 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.
2016-12-23 19:26:57 +00:00
c239ebc31b 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.
2016-12-23 19:26:57 +00:00
6c9c122799 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.
2016-12-23 12:48:46 +00:00
274348cbac 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.
2016-12-23 00:01:58 +00:00
89d8c578e7 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.
2016-12-22 23:11:02 +00:00
d9d92cf220 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.
2016-12-22 23:11:02 +00:00
Gabriel Laskar
2aa03c2af6 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>
2016-12-22 23:11:02 +00:00
Gabriel Laskar
dd3548a691 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>
2016-12-22 23:11:02 +00:00
Eugene Syromyatnikov
00265afe4a 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.
2016-12-22 23:11:02 +00:00
fd4d4edd2b 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.
2016-12-21 23:35:29 +00:00
464566440a 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.
2016-12-21 23:35:29 +00:00
4b6d304c80 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.
2016-12-21 23:35:29 +00:00
ac68c7db14 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.
2016-12-21 23:35:29 +00:00
a06073fbbb 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.
2016-12-21 23:35:28 +00:00
fa66f3f700 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.
2016-12-21 23:35:28 +00:00
8afd294eb3 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.
2016-12-21 23:35:28 +00:00
c6d15a9b0d 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.
2016-12-21 23:35:27 +00:00
b0499e6d42 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.
2016-12-21 22:25:31 +00:00
2b5a0ea7db 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.
2016-12-21 22:25:30 +00:00
c30f689384 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.
2016-12-21 22:25:30 +00:00
e68e2a84b0 scsi: use umove_or_printaddr
* scsi.c (scsi_ioctl): Use umove_or_printaddr.
2016-12-21 22:25:30 +00:00
73be1d7e2e Remove dumpiov wrapper
* defs.h (dumpiov): Remove.
* syscall.c (dumpio): Use dumpiov_upto instead of dumpiov.
2016-12-21 22:25:30 +00:00
4d7b7b18bd 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.
2016-12-21 22:25:30 +00:00