IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Added in v4.10-rc1~202^2~340^2~2.
* xlat/ip_cmsg_types.in (SCM_SECURITY): Provide fallback message,
reorder.
(IP_RECVFRAGSIZE): New constant.
* msghdr.c (print_cmsg_int): New function.
(cmsg_ip_printers) <IP_RECVFRAGSIZE>: New printer.
On some historic 32-bit platforms (and 64-bit SuperH), __NR_getrlimit
corresponds to a non-SuS-compatible version that uses a hardcoded value
of 0x7fffffff as infinity. Moreover, in order to provide a backwards
compatibility with that behaviour, some architectures (mips, sparc, and
alpha, with latter being especially peculiar in its ways) just defined
RLIM_INFINITY to that value (with alpha defining RLIM_INFINITY to 2^63-1)
instead of employing sys_old_getrlimit syscall and providing
__NR_ugetrlimit with proper implementation, as other arches did.
Overall, that led to conclusion that printing "RLIM_INFINITY" is never
enough and the actial value should be printed as well.
* linux/i386/syscallent.h ([76]): Changing decoder to old_getrlimit.
* linux/m68k/syscallent.h ([76]): Likewise.
* linux/microblaze/syscallent.h ([76]): Likewise.
* linux/powerpc/syscallent.h ([76]): Likewise.
* linux/s390/syscallent.h ([76]): Likewise.
* linux/sh/syscallent.h ([76]): Likewise.
* linux/sh64/syscallent.h ([76]): Likewise.
* resource.c (sprint_rlim64, sprint_rlim32, print_rlimit64,
print_rlimit32): Remove.
(STRACE_RLIM_INFINITY, STRACE_M32_RLIM_INFINITY,
STRACE_RLIM64_INFINITY, OLD_GETLIMIT_INFINITY): New macro constants.
(enum rlimit_decode_mode): New enumeration.
(struct rlimit_64): Move type definition out of print_rlimit64.
(print_rlim_t): New function, printer of an rlimit value, in accordance
with rlimit decode mode and xlat verbosity mode.
(print_rlimit): Printer of a fetched rlimit_64 structure.
(decode_rlimit): Fetches struct rlimit/rlimit64 in accordance with
current mode and personality, uses print_rlimit for printing.
(do_getrlimit): New function, decodes old_getrlimit/getrlimit syscalls.
(SYS_FUNC(getrlimit)): Call do_getrlimit with RDM_NORMAL mode.
(SYS_FUNC(old_getrlimit)): New function, calls do_getrlimit with
RDM_OLD_GETRLIMIT mode.
(SYS_FUNC(setrlimit)): Call decode_rlimit with RDM_NORMAL mode.
(SYS_FUNC(prlimit64)): Call decode_rlimit with RDM_PRLIMIT64 mode
instead of print_rlimit64.
* tests/xgetrlimit.c (sprint_rlim): Rename to...
(print_rlim): ...this, print to terminal instead of string buffer in
accordance with the output format expected.
(main): Accomodate sprint_rlim -> print_rlim change, use sprintrc.
* tests/getrlimit.c (INFINITY, INFINITY_STR): New macros.
* tests/setrlimit.c: Likewise.
* tests/ugetrlimit.c: Likewise.
* linux/ia64/shuffle_scno.c: New file
* Makefile.am (EXTRA_DIST): Add it.
* linux/ia64/arch_regs.h (IA64_SCNO_BASE): New macro.
* linux/ia64/syscallent.h: Decrease all indices by IA64_SCNO_BASE.
Generate known flags mask and maximum string length.
* xlat.h (struct xlat): Add fields flags_strsz and flags_mask.
* xlat/gen.sh (print_xlat, print_xlat_pair): Add generation of
XLAT_VAL_n and XLAT_STR_n macros.
(gen_header): Generate flags_strsz and flags_mask fields' values using
the generated XLAT_VAL_n and XLAT_STR_n macros, undefine them
afterwards.
Decode struct robust_list_head.
* linux/dummy.h (sys_set_robust_list): Remove.
* get_robust_list.c (DEF_MPERS_TYPE(struct_robust_list_head)): Add mpers
type definition.
Include <linux/futex.h>.
(struct_robust_list_head): New type definition.
Include MPERS_DEFS, "print_fields.h".
(decode_robust_list): New function.
(SYS_FUNC(set_robust_list)): New decoder.
(SYS_FUNC(get_robust_list)): Decode second argument.
* tests/xet_robust_list.c: Include <string.h>, <linux/futex.h>.
(sprintaddr): Remove.
(print_rlh): New function.
(main): Add get_robust_list/set_robust_list checks.
As of now, there's no visible indication that strace itself
has been signalled: it exits with exit code 0 and without any messages.
Let's add a message, at least.
* gcc_compat.h (CMPXCHG): New macro
* strace.c (interrupt): set interrupted signal only once.
(print_signalled): Add support for calling with tcp == NULL.
(terminate): Call print_signalled is qflag is not set and strace
has been interrupted.
For the cases when we hit a race between sock_diag request for a socket
and its addition to the socket list. It collects information about
sockets that created via socket(2) syscall and is used when not protocol
information data is available via normal means.
* defs.h (set_netlink_family_cache_entry,
get_netlink_family_cache_entry, invalidate_netlink_family_cache_entry):
New delcarations.
* desc.c (SYS_FUNC(call)): Call invalidate_netlink_family_cache_entry
for inode being closed.
* net.c (SYS_FUNC(socket)): Call set_netlink_family_cache_entry for
AF_NETLINK sockets, do not return RVAL_DECODED on entering for them.
* socketutils.c: New enumeration for cache-related constants.
(NLF_CACHE_KEY_MASK): Cache key mask constant.
(netlink_cache): Fallback cache for netlink protocol numbers.
(set_netlink_family_cache_entry, get_netlink_family_cache_entry,
invalidate_netlink_family_cache_entry): New functions.
(netlink_get): Request protocol via get_netlink_family_cache_entry if
not information has been obtained.
It may return API and features even with errno set to EINVAL.
* userfaultfd.c (print_uffdio_api_start): New function.
(uffdio_ioctl): Decode api and features fields on exiting if errno
is EINVAL.
* xlat/fan_init_flags.in (FAN_ENABLE_AUDIT): New constant, introduced by
Linux commit v4.15-rc1~130^2^2~11.
* tests/fanotify_init.c: Update expected output.
Handle error_msg output similarly to the output from another tcb.
* Makefile.am (strace_CPPFLAGS): Add -DHAVE_DEFS_H.
* error_prints.c [HAVE_DEFS_H]: Include "defs.h" instead of "config.h".
(verror_msg): Call finish_line before fflush().
* error_prints.h (finish_line): New declaration.
* strace.c (finish_line): New function.
* count.c (struct call_counts): Add time_min, time_max fields.
(max_ts): New constant.
(enum count_summary_columns): Add CSC_TIME_MIN, CSC_TIME_MAX.
(count_syscall): Fill time_min field with max_ts in counts
initialisation, update time_min and time_max.
(min_time_cmp, max_time_cmp): New functions.
(set_sortby): Add keys for them.
(set_count_summary_columns): Add support for time_min and time_max
fields printing.
* strace.1.in (.SH OPTIONS) <-S, -U>: Document it.
Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=240945
Closes: https://github.com/strace/strace/issues/32
For completeness.
* count.c (avg_time_cmp, error_cmp): New functions.
(set_sortby): Add sort keys for the new fields.
* strace.1.in (.SH OPTIONS) <-S>: Document it.
In preparation to extension.
* count.c (enum count_summary_columns): New enumeration type.
(struct call_counts): Add time_avg field.
(DEF_COLUMNS): New macro.
(columns, visible): New variables.
(num_chars): New function.
(call_summary_pers): Calculate aggregate data first, then output table
based on columns configuration.
* tests/count-f.expected: Update expected output.
* tests/strace-C.expected: Likewise.
* tests/strace-S.test: Likewise.
* strace.1.in (.SH DESCRIPTION): add man page section numbber to open,
lstat, getpwuid, id mentions.
(.SH OPTIONS): make strace mentions bold.
(.SH NOTES): It was meant setrlimit(3), not setrlimit(2).
* mmap_cache.h (mmap_cache_rebuild_if_invalid_): rename from
mmap_cache_rebuild_if_invalid.
(mmap_cache_rebuild_if_invalid): New macro, a wrapper for
mmap_cache_rebuild_if_invalid_ that supplies __func__ to it.
(mmap_cache_free_): New declaration.
(mmap_cache_free): New macro, a wrapper for mmap_cache_free_ that
supplies __func__ to it.
* mmap_cache.c (mmap_cache_rebuild_if_invalid_): Rename from
mmap_cache_rebuild_if_invalid.
(mmap_cache_free_): New function.
* unwind-libunwind.c (tcb_walk): Remove __func__ argument from the
mmap_cache_rebuild_if_invalid call.
* kvm.c (vcpu_get_info): Likewise.
* strace.c (droptcb): Call mmap_cache_free.
As of now, when -e raw is set, ERESTART* return code descriptions
are not printed (generic "-1 ERESTART_RESTARTBLOCK (Unknown error 516)"
is printed instead).
* syscall.c (err_desc): New function.
(print_err_ret): Print return code if it is not a ERESTART* error.
(syscall_exiting_trace): Use print_err_ret for normal error return
string printing.
clang complains about it, so it might be a good reason to refactor it
into something more linear.
* syscall.c (syscall_entering_decode): put syscall subcall decoding
before ipc/socket subcall decoding, remove loop.
And provide some alternative names for the sorting options, as some
might be easier to remember than others.
* count.c (set_sortby): Replace nested if's with iteration over a table;
add aliases for the existing sorting options.
* strace.1.in (.SH OPTIONS) <-S>: Document new aliases.
As the source tarball is in xz format already, there is high chance
that xz is already required for the build environment.
* strace.spec.in (BuildRequires): Replace gzip with xz.
(%build): Comparess change logs with xz.
(%files): s/gz/xz.
Before, it relied on implicit assumptions that syscall-exit event is
right the next one after syscall-enter. Also, there's some additional
debugging output that may be might help someone someday.
* count.c (count_syscall): Calculate system time as difference of tcp's
stime and ltime.
* defs.h (struct tcb): Add ltime, atime fields, remove dtime.
* strace.c (droptcb): Print total system time spent by a tcb.
(startup_tcb): Store initial system time in atime.
(next_event): Update stime directly.
* syscall.c (syscall_entering_finish): Store current system time in
tcb's ltime field.
(syscall_exiting_finish): Likewise.
* count.c (time_cmp. syscall_cmp): Change arguments type
to "const void *", Change indices cast type to "unsigned int *".
(count cmp): Likewise. Change count variables type to unsigned int.
(sortfun): Provide types of arguments.
* count.c (zero_ts): New variable.
(count_syscall): Calculate the spent time in the wts variable, then add
it to cc->time.
(call_summary_pers): Do not perform overhead correction.
* count.c (set_overhead): Change argument type to const char *, call
parse_ts to parse it and set to overhead.
* defs.h (set_overhead): Update declaration.
* strace.c: (init) <case 'O'>: do not parse argument, pass optarg to
set_overhead call.
* tests/count.test (GENERIC, WALLCLOCK, HALFCLOCK): New variables with
expected patterns.
Add checks for the new -O syntax.
* delay.c (fill_delay_data): Change intval argument to struct timespec
*val, assign val to ts.
* delay.h (fill_delay_data): Update function declaration.
* filter_qualify.c (parse_delay_token): Parse input with parse_ts,
supply the resulting struct timespec to fill_delay_data.
* tests/delay.c (check_): New function for providing diagnostic in case
of check failure.
(check_delay): Use it.
* tests/delay.test: Check new delay syntax.