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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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.
This enables printing of iovec arrays even in case of failed syscall
(failed syscall doesn't mean that iovec itself is inaccessible and
useless). One caveat here is that we should explicitly provide proper
IOV_DECODE_* value based on syserror value in case printing is performed
on exiting; we can't simply override it to IOV_DECODE_ADDR on exiting
when syserror is up, since this may be called by code which tries to
print iovec containing local data, which should be perfectly accessible
(on the other hand, there are no cases of such behaviour at the moment).
Since iovecs themselves are printed even if syscall has failed now,
preadv test is updated to reflect this. It is notable, though, that this
is the only place where this case is checked.
* io.c (tprint_iov_upto): Specify umoven_or_printaddr_ignore_syserror
instead of umoven_or_printaddr as umoven_func parameter.
(SYS_FUNC(readv), do_preadv): Specify decode_iov parameter value
based on syserror(tcp) value.
* scsi.c: (print_sg_io_v3_res, print_sg_io_v4_res): Likewise.
* tests/preadv.c: Update expected output for the case when preadv
with singe-item iovec failed.
This change makes behaviour of umoven_or_printaddr_ignore_syserror in
line with umoven_or_printaddr when verbose flag is disabled.
* v4l2.c (umoven_or_printaddr_ignore_syserror): Simply call printaddr
when verbose flag is unset.
It is size_t and without compat on x32/n32.
* lookup_dcookie.c (SYS_FUNC(lookup_dcookie)): Change conversion
specifier from "%lu" to "%llu", use getarg_ull for len argument
retrieval.
Analogous to offsetof but returns structure offset after the specified
field. Useful for checking whether specific field is present in obtained
data or specifying amount of data to copy based on the (last) field needed.
* defs.h (offsetofend): New macro.
Since new values have been added gradually over various kernel versions,
it's better to define them explicitly in order to avoid situations when
strace built with older kernel headers cannot decode some recently
defined values.
* xlat/clocknames.in: Add values for constants.
* tests/quotactl.h (fill_memory_ex): Add period parameter,
use it as a divisor in non-constant part of value.
(fill_memory): Specify period of 0x80 to fill_memory_ex call.
* tests/quotactl-xfs.c (main): Likewise.
This potentially fixes keyctl decoder for x32 personality.
* keyctl.c (keyctl_update_key, keyctl_read_key, keyctl_instantiate_key,
keyctl_instantiate_key_iov, keyctl_dh_compute): Change addr and len
arguments to kernel_ulong_t. Print len using %llu format.
(keyctl_keyring_search): Change addr1 and addr2 arguments
to kernel_ulong_t.
(print_dh_params): Change addr argument to kernel_ulong_t.
(SYS_FUNC(keyctl)): Retrieve arguments via getarg_ull, pass them
to the appropriate handlers.
* keyctl.c (keyctl_update_key): Change addr and len arguments
to unsigned.
(keyctl_read_key): Likewise.
(keyctl_instantiate_key): Likewise.
(keyctl_instantiate_key_iov): Likewise.
(keyctl_dh_compute): Likewise.
(keyctl_keyring_search): Change addr1 and addr2 arguments to unsigned.
(keyctl_chown_key): Change user and group arguments to unsigned.
(keyctl_get_persistent): Change uid argument to unsigned.
keyctl_read_key had subtle bug by treating out buffer in KEYCTL_READ
as NUL-terminated, which is not true. We fix it by adding parameter to
keyctl_read_key signalising whether buffer is NUL-terminated and using
printstr_ex for printing (expectedly) NUL-terminated strings.
* keyctl.c (keyctl_read_key): Add has_nul parameter. Do not use -1 as
string len. Use printstr_ex for buffer output with user style depending
on has_nul value.
(SYS_FUNC(keyctl)): Specify has_nul parameter to keyctl_read_key
by comparing cmd value with KEYCTL_READ.
This is useful for providing QUOTE_OMIT_TRAILING_0 and maybe other
flags.
* defs.h (printstr_ex): New prototype.
(printstr): Change to a wrapper around printstr_ex with zero user style.
* util.c (printstr): Rename to ...
(printstr_ex) ... new function, add user_style argument which is or'ed
with computed style.
It is useful in cases strings with size provided are expected to be
NUL-terminated but are not trustworthy enough to call just plain
printstr(str, -1).
* defs.h (QUOTE_OMIT_TRAILING_0): New constant definition.
* util.c (string_quote): Swallow terminating NUL if
QUOTE_OMIT_TRAILING_0 is set.
* keyctl.c (struct keyctl_dh_params): New structure.
(print_dh_params, keyctl_dh_compute): New functions.
(SYS_FUNC(keyctl)): Add support for KEYCTL_DH_COMPUTE cmd value.
* syscall.c (trace_syscall_exiting): Use err_name() instead
of open-coding it. Print unrecognized errno values using %lu format
instead of ERRNO_%lu as the latter prodices an invalid constant.
This is the type actually used for the error code on architectures
that use a dedicated register.
* defs.h (struct tcb): Change the type of u_error to unsigned long.
* syscall.c (trace_syscall_exiting): Change the type of u_error variable
to unsigned long, print it using %lu format, drop no longer needed
explicit cast to unsigned long.
(saved_u_error): Change type to unsigned long.
Since this command doesn't have any additional arguments, the comma does
not needed. Since this is the only command which lacks additional
arguments, it's better to add special case for it rather than add
printing of comma to all other commands.
* keyctl.c (SYS_FUNC(keyctl)): Add check for command not being
KEYCTL_SESSION_TO_PARENT when printing comma dividing cmd argument
from the rest.
Otherwise it is erroneous on x32, for example.
* keyctl.c (SYS_FUNC(keyctl)): Use "%#llx" conversion specifier
and getarg_ull for fallback argument printing.
UID/GID are unsigned except special -1 value (which is also special in
context of specific keyctl commands), so special printing function
should be used.
* keyctl.c (keyctl_chown_key, keyctl_get_persistent): Use printuid
instead of printf with "%d" conversion for printing UID/GID.
Otherwise it can be depleted and print_iovec starts printing empty
strings.
* io.c (print_iovec): Interpret c->data_size of -1 as unlimited data
and do not decrease it in this case.
Enhance abbrev=, raw=, and verbose= to accept the same syntax as trace=.
For example, this allows such syntax as -e verbose=file.
* syscall.c (lookup_class): Define before qual_syscall.
(qualify): Move the loop based on lookup_class ...
(qual_syscall): ... here.
* tests/qual_syscall.test: Check it.
fadvise_64_64 decoder used before this change prints different sign
of the "len" argument (loff_t vs size_t).
* linux/x32/syscallent.h (fadvise64): Replace SEN(fadvise64_64)
with SEN(fadvise64).
Since its type is size_t, it is 64-bit wide on x32 and special care
should be taken in order to obtain it.
* fadvise.c (SYS_FUNC(fadvise64)): Use getarg_ull for obtaining value
of "len" syscall argument.
These allow retrieving specific argument in full taking into account
peculiarities of runtimes which employ tcp->ext_arg (e.g. x32).
* defs.h (getarg_ll, getarg_ull): New prototypes.
* util.c (getarg_ll, getarg_ull): New functions.
(printargs): Use getarg_ull.
The kernel declares fadvise64 as
long sys_fadvise64(int fd, loff_t offset, size_t len, int advice);
* fadvise.c (SYS_FUNC(fadvise64)): Change conversion specifier from
"%ld" to "%lu" for printing len argument since kernel expects argument
of type size_t.
This change is no-op yet, but things will change when decoder
of fadvise64 syscall get fixed.
* linux/sh64/syscallent.h (fadvise64_64): Replace SEN(fadvise64)
with SEN(fadvise64_64).
* linux/sparc64/syscallent.h (fadvise64_64): Likewise.