Commit Graph

16 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
9d095c7860 Add copyright headers 2017-05-22 17:33:51 +00:00
89636759d7 Automatically replace PRI_kr[dux] with PRI_kl[dux]
Remove temporary macros created for transition from long
to kernel_ulong_t.

Automatically replace PRI_kr[dux] with PRI_kl[dux] using
$ git grep -l 'PRI_kr[dux]' | xargs sed -ri 's/PRI_kr([dux])/PRI_kl\1/g'

* defs.h (PRI_krd, PRI_kru, PRI_krx): Remove.  All users updated.
2016-12-26 10:43:34 +00:00
7fa3d78319 Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t
Remove temporary types created for transition from long
to kernel_ulong_t.

Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'

* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
2016-12-26 10:43:34 +00:00
1d5bb61c49 Print kernel_ureg_t and kernel_scno_t using dedicated format strings
Prepare for the change of kernel_ureg_t and kernel_scno_t from
unsigned long to kernel_ulong_t.

* defs.h (PRI_krd, PRI_kru, PRI_krx): New temporary macros.
All users updated.
2016-12-26 10:43:04 +00:00
569dc792d5 process_vm: change size arguments type from unsigned long to kernel_ureg_t
* process_vm.c (SYS_FUNC(process_vm_readv),
SYS_FUNC(process_vm_writev)): Change the type of local_iovcnt,
remote_iovcnt, and flags from unsigned long to kernel_ureg_t.
2016-12-25 11:32:45 +00:00
552888b1ac Do not use widen_to_ulong in kexec.c and process_vm.c
Automatic argument truncation makes use of this function redundant.

* kexec.c (SYS_FUNC(kexec_load)): Do not invoke widen_to_ulong.
* process_vm.c (SYS_FUNC(process_vm_readv),
SYS_FUNC(process_vm_writev)): Likewise.
2016-12-20 05:10:21 +00:00
Eugene Syromyatnikov
5fbb3d299d process_vm: use widen_to_ulong for local_iovcnt, renote_iovcnt, and flags
* process_vm.c (SYS_FUNC(process_vm_readv),
SYS_FUNC(process_vm_writev)): Use widen_to_ulong for local_iovcnt,
renote_iovcnt, and flags parameters.
2016-10-28 18:40:11 +00:00
Eugene Syromyatnikov
d44a77ca58 process_vm: print pid argument as int
* process_vm.c (SYS_FUNC(process_vm_readv),
SYS_FUNC(process_vm_writev)): Change conversion specifier for pid
argument from "%ld" to "%d".
2016-10-28 18:40:11 +00:00
Eugene Syromyatnikov
44ffbf0adc process_vm: remove syserror check for iovec printing
This check had been done by print_array inside tprint_iov anyway.

* process_vm.c (SYS_FUNC(process_vm_readv)): Use tprint_iov_upto for
printing local_iov; do not check for syserror, provide decode_iov
parameter to tprint_iov{,_upto} based on its value instead.
2016-10-28 18:40:11 +00:00
Fabien Siron
2a54d8b257 Add a enum for decoding to tprint_iov() and tprint_iov_upto()
Introduce a new type iov_decode which will be used instead of the integer
"decode" as a parameter.

* defs.h (iov_decode): New enum.
(tprint_iov, tprint_iov_upto): Change type of "decode_iov" to enum iov_decode.
* aio.c (print_iocb): Change type of "decode_iov" to enum iov_decode in
tprint_iov() call.
* keyctl.c (keyctl_instantiate_key_iov): Likewise.
* process.c (ptrace): Likewise.
* process_vm.c (process_vm_readv, process_vm_writev): Likewise.
* io.c (writev, do_pwritev, vmsplice): Likewise.
(print_iovec): Replace the condition with a switch.
(tprint_iov_upto): Change type of "decode_iov" to enum iov_decode.
(readv, do_preadv): Change type of "decode_iov" to enum iov_decode in
tprint_iov_upto() call.
* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
print_sg_io_v4_res): Likewise.
* net.c (do_msghdr): Adapt call of tprint_iov_upto().
2016-06-22 14:40:57 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
684c9e9d3d process_vm.c: make use of RVAL_DECODED
* process_vm.c (sys_process_vm_writev): Update for RVAL_DECODED.
2015-07-18 00:01:40 +00:00
66a344c006 process_vm.c: use printaddr
* process_vm.c (sys_process_vm_readv): Use printaddr.
2015-07-18 00:01:40 +00:00
a0bd3749fc Declare syscall parsers using SYS_FUNC macro
Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
2015-04-07 11:22:49 +00:00
87af1935fb Cleanup process_vm_writev syscall decoding
* process_vm.c (sys_process_vm_writev): Do not check for syserror,
it is not applicable on entering syscall.
2015-03-31 21:00:39 +00:00
db16c52668 process.c: move process_vm_readv and process_vm_writev parsers to a separate file
* process_vm.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_process_vm_readv, sys_process_vm_writev): Move
to process_vm.c.
2014-12-11 21:40:23 +00:00