Commit Graph

11 Commits

Author SHA1 Message Date
b93d52fe3d Change the license of strace to LGPL-2.1-or-later
strace is now provided under the terms of the GNU Lesser General
Public License version 2.1 or later, see COPYING for more details.

strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00
6bc832e2bc Update copyright headers
Headers updated automatically using maint/update_copyright_years.sh
script.
2018-04-05 01:40:00 +00:00
0b03de74bc build: prepare for -Wimplicit-fallthrough=5
* gcc_compat.h (ATTRIBUTE_FALLTHROUGH): New macro.
* block.c (block_ioctl): Use it instead of "fall through" comment.
* btrfs.c (btrfs_ioctl): Likewise.
* loop.c (loop_ioctl): Likewise.
* mtd.c (mtd_ioctl): Likewise.
* rtc.c (rtc_ioctl): Likewise.
* v4l2.c (v4l2_ioctl): Likewise.
* dm.c (dm_decode_values): Likewise.
* process.c (SYS_FUNC(ptrace)): Likewise.
* quota.c (decode_cmd_data): Likewise.
* ucopy.c (umovestr): Likewise.
* unwind.c (unwind_print_stacktrace, unwind_capture_stacktrace)):
Likewise.
* term.c (term_ioctl): Add ATTRIBUTE_FALLTHROUGH.
* ioctl.c (ioctl_decode) [ALPHA || POWERPC]: Likewise.
* m4/st_warn_cflags.m4 (gl_WARN_ADD): Add -Wimplicit-fallthrough=5.
* tests/ioctl_v4l2.c (init_v4l2_format): Reorganize the switch statement
without implicit fallthrough.
2018-03-06 23:52:08 +00:00
Eugene Syromyatnikov
7ead136575 ucopy: return string size in umovestr
We return the size that includes \0 in order to preserve existing
behaviour (return 0 when \0 haven't been seen, return positive number
when it has been seen).

* ucopy.c (umovestr_peekdata, umovestr): Return string length
including \0 instead of 1 when \0 is found.
2018-01-19 22:45:34 +00:00
ce822389af ucopy: cleanup umoven_peekdata and umovestr_peekdata
* ucopy.c (umoven_peekdata, umovestr_peekdata): Merge aligned
and unaligned tracee address cases.
2017-07-31 18:25:00 +00:00
9688f6a30d ucopy: move legacy fallbacks of umoven and umovestr to separate functions
Move legacy PTRACE_PEEKDATA-based support to separate functions.

* ucopy.c (umoven_peekdata, umovestr_peekdata): New functions.
(umoven, umovestr): Use them.
2017-07-31 18:25:00 +00:00
5edeed4295 ucopy: move process_vm_readv ENOSYS check to vm_read_mem
* ucopy.c (vm_read_mem): Set process_vm_readv_not_supported in case
of ENOSYS.
* ucopy.c (umoven, umovestr): Do not set process_vm_readv_not_supported.
2017-07-31 18:21:56 +00:00
5fe47894af ucopy: refactor the check for invalid tracee addresses
* ucopy.c (tracee_addr_is_invalid): New function.
* ucopy.c (umoven, umovestr): Use it.
2017-07-30 23:40:24 +00:00
5f96feb9b7 ucopy: enhance vm_read_mem error diagnostics
* ucopy.c (umoven, umovestr): Enhance vm_read_mem error diagnostics
to match PTRACE_PEEKDATA case.
2017-07-30 23:28:12 +00:00
ccba47d80a ucopy: skip redundant tracee address truncation check
* ucopy.c (vm_read_mem): Skip raddr != truncated_raddr check
if these variables have the same data size.
2017-07-29 23:27:52 +00:00
429c08130b util: move umoven and umovestr to a separate file
These functions are more kernel-specific compared to all other functions
defined in util.c.

* ucopy.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* util.c (umoven, umovestr): Move to ucopy.c.
2017-07-28 10:24:35 +00:00