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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
* syslog.c (SYS_FUNC(syslog)): Store conversion to int of tcp->u_arg[2]
in len; print address using printaddr64 (as syslog doesn't use compat
for x32), and third argument as int (as it has this type in the syscall
handler).
* tests/syslog.c: Add checks.
* syslog.c (SYS_FUNC(syslog)): Defer printing of comma after the first
argument to the specific command handlers, return RVAL_DECODED without
additional printing for SYSLOG_ACTION_CLOSE, SYSLOG_ACTION_OPEN,
SYSLOG_ACTION_CLEAR, SYSLOG_ACTION_CONSOLE_OFF,
SYSLOG_ACTION_CONSOLE_ON, SYSLOG_ACTION_SIZE_UNREAD,
SYSLOG_ACTION_SIZE_BUFFER.
* tests/syslog.c: Add checks.
* defs.h (decode_inotify_read): New declaration.
* inotify.c: Include "print_fields.h".
(decode_inotify_read): New function.
* io.c (decode_readbuf) <decoders>: Add decoder for anon_inode:inotify.
* defs.h (enum fileops): New enumeration definition.
(filebuf_decoder_fn): New type definition.
* io.c: Include <fnmatch.h>
(struct filebuf_decoder_desc): New type definition.
(decode_filebuf, decode_readbuf, decode_writebuf): New functions.
(SYS_FUNC(read), SYS_FUNC(write), SYS_FUNC(pread), SYS_FUNC(pwrite)):
Call decode_readbuf/decode_writebuf instead of printing I/O buffer as a
string.
* maint/gen_xlat_defs.sh: Change regular expressions for parsing common
and arch-specific files so they match macro definitions where whitespace
between "#" and "define" is present.
* linux/arm/syscallent.h ([222]): Remove definition, add a comment that
it was tux().
([223]): Remove definition, add comment that it was unused.
([254]): Remove definition, add comment that it was reserverd
for set_thread_area.
([255]): Remove definition, add comment that it was reserved
for get_thread_area.
This commits adds ability to request for unknown generic netlink
families after the initial xlat initialisation. It also changes
socketutils-level interface so it returns string and not xlat.
* defs.h (genl_families_xlat): Remove.
(genl_get_family_name): New declaration.
* netlink.c (decode_nlmsg_type_generic): Use genl_get_family_name
instead of genl_families_xlat.
* socketutils.c (genl_query_families): Rename from
genl_send_dump_families, add "id" parameter, perform dump if id == -1,
request specific ID otherwise.
(genl_get_family_name): Rename from genl_families_xlat, add "id"
parameter, return const char *; request specific genetlink family name
if it is not found in the already initialised xlat.
As it might be of interest. Since uaddr itself is as important as the
containing value, it's alwais printed as comment.
* xlat/futexpiflags.in: New file.
* futex.c [!FUTEX_TID_MASK] (FUTEX_TID_MASK): New macro constant.
Include "xlat/futexpiflags.h".
(printaddrnum, printaddrpival): New functions.
(SYS_FUNC(futex)): Use printaddrpival/printaddrnum for printing uaddr
and uaddr2 values where appropriate.
* tests/futex.c: Update expected output.
As those are allocated dynamically.
* netlink.c (decode_nlmsg_type_generic): Use XLAT_STYLE_VERBOSE.
* tests/netlink_generic.c: Update expected output.
* xlat/kvm_cap.in (KVM_CAP_NESTED_STATE): New constant, introduced
by Linux commit v4.19-rc1~87^2~62.
(KVM_CAP_ARM_INJECT_SERROR_ESR): New constant, introduced by Linux
commit v4.19-rc1~55^2~12^2~14, merged with its final value
in v4.19-rc1~55^2~12.
(KVM_CAP_MSR_PLATFORM_INFO): New constant, introduced by Linux commit
v4.19-rc5~8^2~2.
* xlat/ioc_types.in: New file
* ioctl.c: Include "xlat/ioc_types.h"
(ioctl_type_str): New function.
(ioctl_print_code): Use ioctl_type_str for decoding _IOC_TYPE(code).
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.