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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
gcc8 -Wall -Werror rejects our method of struct sockaddr_un.sun_path
initialization because the field lacks __nonstring__ attribute.
As we calculate the length of the string being copied anyway,
workaround this gcc+glibc bug by changing the code to use this
pre-calculated length and get rid of strncpy completely.
* tests/net-accept-connect.c (main): Use memcpy to initialize sun_path.
As definitions of O_* macros provided by various libc implementations
are usually less reliable than those provided by kernel headers, switch
to use kernel's fcntl.h header.
* open.c: Include <asm/fcntl.h> instead of <fcntl.h>. Remove
O_LARGEFILE fallback definitions assuming that the kernel headers
provide them.
* xlat/open_mode_flags.in: Add __O_SYNC after O_SYNC. Add O_TMPFILE
and __O_TMPFILE before O_DIRECTORY. Remove "O_TMPFILE & ~O_DIRECTORY".
* tests/open.c: Include <asm/fcntl.h> instead of <fcntl.h>. Remove
workarounds for libc O_TMPFILE implementations.
* tests/openat.c: Include <asm/fcntl.h> instead of <fcntl.h>.
(test_mode_flag): New function.
(main): Use it to check decoding of all access modes and file flags.
* tests/gen_tests.in (openat): Add -a option.
Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
* xlat/socktcpoptions.in: Add TCP_FASTOPEN_KEY and
TCP_FASTOPEN_NO_COOKIE introduced by linux kernel commits
v4.15-rc1~84^2~387 and v4.15-rc1~84^2~339, respectively.
* NEWS: Mention this.
* xlat/mmap_flags.in: Add MAP_SHARED_VALIDATE and MAP_SYNC introduced
by linux kernel commits v4.15-rc1~71^2^2~23 and v4.15-rc1~71^2^2~12,
respectively.
* NEWS: Mention this.
Because there are never enough print_quoted_string flags.
* defs.h (QUOTE_EMIT_COMMENT): New quoting flag macro constant.
* util.c (string_quote): Emit " /* " in the beginning and " */" in the
end if QUOTE_EMIT_COMMENT is passed.
(print_quoted_string): Increase alloc_size by 7 if QUOTE_EMIT_COMMENT is
passed.
As the remaining non-generated ioctl tests differ from ioctl.test only
in strace options, and since gen_tests.sh can pass arguments to sourced
tests, replace the remaining non-generated ioctl tests with invocations
of ioctl.test with appropriate parameters.
* tests/ioctl.test: Pass script arguments to the strace invocation.
* tests/gen_tests.in (ioctl_dm): New entry, invoke ioctl.test with -s9.
(ioctl_dm-v): New entry, invoke ioctl.test with -v -s9.
(ioctl_kvm_run): New entry, invoke ioctl.test with -a36 -y.
(ioctl_loop-nv): New entry, invoke ioctl.test with -a22 -e verbose=none.
(ioctl_nsfs): New entry, invoke ioctl.test with -esignal=none.
(ioctl_sock_gifconf): New entry, invoke ioctl.test with -a28 -s1.
(ioctl_evdev-v, ioctl_loop-v, ioctl_rtc-v): Invoke ioctl.test
with -v option instead of ioctl-v.sh.
* tests/ioctl_dm-v.test: Remove.
* tests/ioctl_dm.test: Likewise.
* tests/ioctl_kvm_run.test: Likewise.
* tests/ioctl_loop-nv.test: Likewise.
* tests/ioctl_nsfs.test: Likewise.
* tests/ioctl_sock_gifconf.test: Likewise.
* tests/ioctl-v.sh: Likewise.
* tests/Makefile.am (DECODER_TESTS, EXTRA_DIST): Remove them.
* tests/gen_tests.sh: Read first argument separately, put it in $arg0,
and the rest of the arguments in $args.
(case "$arg0" in) <+*)>: Set command line to $args and source $arg0.
From the very first commit when CRIS architecture support was introduced
and up to this comment that ends the agony of this non-functional code,
this support was incomplete and could never be compiled.
* Makefile.am (EXTRA_DIST): Remove linux/crisv*.
* clone.c: Remove CRISV* checks.
* configure.ac ($host_cpu == cris*): Remove.
* linux/crisv10: Remove.
* linux/crisv32: Likewise.
Fixes: v4.5.18-77-gea0e6e8 ("CRIS support by Hinko Kocevar ...")
* futex.c (VALP, VALP_PR, VAL2P, VAL2P_PR): New macro definitions.
(main): Allow EINVAL on *REQUEUE* checks with VAL/VAL2 with higher bit
being set, check that the existing behaviour preserved with VALP/VAL2P
where higher bit is unset.
Based on an analysis of arm_syscall in arch/arm/kernel/traps.c.
* linux/arm/syscallent.h ([ARM_FIRST_SHUFFLED_SYSCALL+1+2]): Update
argument number, add TM flag.
([ARM_FIRST_SHUFFLED_SYSCALL+1+1], [ARM_FIRST_SHUFFLED_SYSCALL+1+3],
[ARM_FIRST_SHUFFLED_SYSCALL+1+4], [ARM_FIRST_SHUFFLED_SYSCALL+1+5]):
Update argument number.
We (apparently) had a long-standing test failure inside strace-ff.test
with the symptom that it misses exit_group call. As it turned out, it
was PTRACE_EVENT_EXEC followed by execve syscall exiting stop. That
behaviour indeed screwed all the syscall state tracking for the tracee.
Let's try to patch it up by calling trace_syscall when we receive
PTRACE_EVENT_EXEC outside syscall.
* defs.h (TCB_RECOVERING): New tcb flag.
* strace.c (dispatch_event) <case TE_STOP_BEFORE_EXECVE>: Invoke
trace_syscall with TCB_RECOVERING flag being set for the current_tcp
if the tracee is not on exiting syscall.
* syscall.c (get_scno): Set QUAL_RAW if we are recovering.
(tamper_with_syscall_entering): Do not perform actual tampering during
recovery as it's already too late.
* NEWS: Mention it.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
* tests/set_ptracer_any.c (main) [HAVE_PRCTL]: Provide fallback
definitions for PR_SET_PTRACER and PR_SET_PTRACER_ANY constants,
set all unused prctl arguments to 0.
If the kernel contains commit 84d77d3f06e7e8dea057d10e8ec77ad71f721be3,
both PTRACE_PEEKDATA and process_vm_readv become unavailable when the
process dumpable flag is cleared, on ia64 this results to all syscall
arguments being unavailable.
Recognize this situation and do not treat it as get_syscall_args error
because the latter leaves the tracee in a ptrace stop.
This condition used to be triggered by prctl-dumpable test that caused
strace to hang indefinitely.
* linux/ia64/get_syscall_args.c (get_syscall_args): Do not bail out
if umove fails.
* tests/prctl-dumpable.c [__ia64__]: Skip the test.
print_event_exit should have printing_tcp setup analogous to printleader and
syscall_exit_trace before printing its part, otherwise it spuriously resets
curcol in line_ended for the stale printing_tcp if followfork == 2.
* strace.c (print_event_exit): Set printing_tcp to tcp before printing
exiting event line and calling line_ended.
* tests/xselect.c (main) [PATH_TRACING_FD]: Skip if /proc/self/fd/
is not available. Add test calls that use PATH_TRACING_FD.
(main): Conditionalize expected output for those calls
that do not use PATH_TRACING_FD with [!PATH_TRACING_FD].
* tests/_newselect-P.c: New file.
* tests/select-P.c: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add _newselect-P and select-P.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (_newselect-P, select-P): New entries.
* tests/tests.h [!perror_msg_and_fail] (perror_msg_and_fail): New macro
wrapper around the homonymous function.
[!error_msg_and_fail] (error_msg_and_fail): Likewise.
* tests/error_msg.c (perror_msg_and_fail, error_msg_and_fail): New
macros defined to themselves.
As there are more than one old style syscall that take their arguments
via array, generalize fetch_old_mmap_args into a function that could
fetch variable number of arguments.
* mem.c (fetch_old_mmap_args): Transform into ...
* fetch_indirect_syscall_args.c: ... fetch_indirect_syscall_args
in this new file.
* Makefile.am (libstrace_a_SOURCES): Add it.
* defs.h [HAVE_ARCH_OLD_MMAP] (fetch_old_mmap_args): Remove.
(fetch_indirect_syscall_args): New prototype.
* pathtrace.c (pathtrace_match_set) [HAVE_ARCH_OLD_MMAP]: Use
fetch_indirect_syscall_args instead of fetch_old_mmap_args.
As only five architectures have getpagesize syscall, moving the decoder
to libstrace allows to get rid of getpagesize related ifdefs and check
build of getpagesize decoder on other architectures.
* mem.c (SYS_FUNC(getpagesize)): Move ...
* getpagesize.c: ... to this new file.
* Makefile.am (libstrace_a_SOURCES): Add it.