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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The {...} code changes the working dir with `cd`, but the commands outside
of that block expects to be in the original dir. Change to a subshell so
the path outside of this block remains unchanged.
* Makefile.am ($(srcdir)/CREDITS): Change {...} to (...).
When the preadv/pwritev syscalls were added, the ones before it in the
ia64 list were missed, so all the syscalls there and later were not in
the right location (causing things to be decoded incorrectly).
Add the missing syscalls before preadv which also re-aligns all the
syscalls after that point. This fixes the uio.test.
* linux/ia64/syscallent.h: Add syscalls 1310 through 1318.
Looks like ia64 doesn't have sa_restorer either, yet still defines
SA_RESTORER. Deploy the same trick that HPPA is using to make the
test pass.
* signal.c (SA_RESTORER): Undefine when IA64 is defined.
(struct new_sigaction) [IA64]: Disable sa_restorer.
detach-stopped.test is known to fail when PTRACE_SEIZE is not available,
so skip the test in that case.
* tests/detach-stopped.test: Check for "strace -d" output and skip the
test when it says that PTRACE_SEIZE doesn't work.
The preadv/pwritev symbols weren't added to glibc until the 2.10 release,
so trying to build the uio test leads to link failures. Add configure
tests and update uio.test to handle this.
* configure.ac (AC_CHECK_FUNCS): Add preadv/pwritev.
* tests/uio.c: Include config.h.
(main): Check for HAVE_PREADV and HAVE_PWRITEV.
* tests/uio.test: Check exit status of uio helper.
The current detach test code does:
set -e
...
cleanup() {
set +e
kill ...
wait ...
}
...
cleanup
exit 0
The problem is that while `set -e` is disabled for the body of the
cleanup function, it isn't necessarily disabled in the caller scope.
So if the return value of the cleanup function (`wait` in this case)
is non-zero, the script ends up failing overall.
Add an explicit return 0 to the cleanup function so that we don't kill
the overall test pipeline.
* tests/detach-running.test (cleanup): Add return 0.
* tests/detach-sleeping.test (cleanup): Likewise.
* tests/detach-stopped.test (cleanup): Likewise.
This way I don't have to keep reading up on these options and wondering
why the code isn't aborting when the call fails.
* tests/set_ptracer_any.c (main): Note prctl failures are ok.
Previous commit here re-added the bugs trying to be fixed due to a
logic thinko. The patches were tested in isolation and hand merged
later. Oops.
* signal.c (struct new_sigaction): Change || to &&.
Running Linux 3.15 (sparc64) and glibc 2.17 (sparc32) triggers a
rt_sigaction call that does not use SA_RESTORER and has an order
where it inserts a restorer and a size. The current tests don't
support that ordering, so add another regex.
* tests/sigaction.awk: Support no SA_RESTORER and swapped args.
Both these arches have a rt_sigaction syscall that takes 5 args, not 4.
* linux/alpha/syscallent.h (rt_sigaction): Change nargs to 5.
* linux/sparc/syscallent.h (rt_sigaction): Change nargs to 5.
Since the rt_sigaction syscall on hppa doesn't have a sa_restorer,
do not include it in the kernel struct.
We also have to undefine SA_RESTORER so that code doesn't try to
use it. The headers will export this, but the syscall doesn't
actually respect it.
* signal.c (SA_RESTORER): Undefine when HPPA is defined.
(struct new_sigaction): Disable sa_restorer on hppa.
Since the rt_sigaction syscall on alpha doesn't have a sa_restorer,
do not include it in the kernel struct.
* signal.c (struct new_sigaction): Disable sa_restorer on alpha.
This fixes regression introduced by the previous commit.
* io.c (print_llu_from_low_high_val) [SIZEOF_LONG != SIZEOF_LONG_LONG]:
Cast argument to unsigned long before casting it to unsigned long long.
Starting in 3.16, these two syscalls have gotten their own entry
point for x32. See linux 7fd44dacdd803c0bbf38bf478d51d280902bb0f1.
* linux/x32/syscallent.h: Change existing io_{setup,submit} to 64bit,
and add new entry points for x32 specifically.
strace -k does not produce a reliable output on all supported
configurations yet, even basic strace-k.test is known to fail
on some of them.
* strace.c (usage): Document -k option as experimental.
* strace.1: Likewise.
* NEWS: Likewise.
Split stack-fcall.c into several compilation units so that intermediate
function calls would not be optimized out by compiler.
* tests/stack-fcall.c: Move intermediate functions to ...
* tests/stack-fcall-*.c: ... new files.
* tests/Makefile.am (stack_fcall_SOURCES): Add stack-fcall-*.c.
Add two more function calls to the stack. Suggested by Masatake YAMATO.
* tests/stack-fcall.c (f1): Rename to f3.
(f1, f2): New functions.
* tests/strace-k.test: Update.
* unwind.c (build_mmap_cache): Move local variables to the code branch
where they are used. Check return code of sscanf and strdup. Do not
treat unusual memory mappings as fatal errors. Do not skip memory
mappings with path names starting with "[".
* unwind.c (fopen_for_input): Define to fopen64 iff
[_LARGEFILE64_SOURCE && HAVE_FOPEN64], otherwise define it to fopen.
(build_mmap_cache): Use fopen_for_input instead of fopen.
Fix compilation warnings in unwind.c on 32-bit architectures.
On some architectures getuid is actually getuid32, so change the test
to use getpid instead of getuid.
* unwind.c (STACK_ENTRY_SYMBOL_FMT): Explicitly cast function_off_set
to unsigned long.
(queue_put_error): Change the 3rd argument's type to unsigned long.
* tests/stack-fcall.c (f1): Use getpid instead of getuid.
* tests/strace-k.test: Likewise.
* debian/rules: Follow the advice in https://wiki.debian.org/Hardening
and enable maximum hardening as for programs that handle untrusted data.
Patch by Markus <waldeck@gmx.de>.
* debian/control (strace64): Fix a typo in package description.
Patch by Pascal De Vuyst <pascal.devuyst@gmail.com>.
(strace, strace-udeb): Add x32 to architecture list.
Patch by Guillaume Morin <guillaume@morinfr.org>.
(strace, strace-udeb): Add or1k to architecture list.
Patch by Christian Svensson <debian@cmd.nu>.
(strace, strace-udeb): Add arm64 to architecture list,
and remove defunct arm.
Patch by Wookey <wookey@debian.org>.
This fixes Debian bugs: #697625, #727018, #742235, #749956.
$ groff -ww -mandoc -z strace.1
strace.1:65: warning: macro `IX' not defined
* strace.1: define IX macro as empty for groff.
Change remaining '-' as minus to '\-'.
Have two word spaces after a full stop as an end of sentence.
Use extra space ('\,' or '\/') between roman and italic characters.
Based on patch by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.
This fixes Debian bug #725987.
Instead of handling stacktrace capturing and mmap cache invalidating in
sys_* functions, handle them uniformly in trace_syscall_entering using
new flags introduced by previous two commits.
The patch is simpler than its older version(v3). The value of
hide_log_until_execve is just ignored. I found the value is nothing
to do with this patch. unwind_cache_invalidate is mentioned only
once in trace_syscall_exiting.
Both are suggested by Dmitry Levin.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Add SE flag to execve, exit, and exit_group syscall entries.
Add SI flag to brk, execve, mmap, mprotect, mremap, munmap,
remap_file_pages, shmat, and shmdt syscall entries.
Some system calls require capturing the stack trace before they are
processed in kernel. Typical one is execve. Some system calls require
invalidating mmap cache after they are processed in kernel.
In current implementation these requirements are handled directly by
appropriate syscall handlers. However, it is difficult to keep the
source code maintainable using this approach to cover all system calls
which have such requirements.
A more generic way to implement this is to flag all syscalls that
require special processing, and handle these flags right in
trace_syscall_entering instead of changing syscall handlers.
This patch just defines new flags: STACKTRACE_INVALIDATE_CACHE and
STACKTRACE_CAPTURE_ON_ENTER.
The names of macros are suggested by Dmitry Levin.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Here is the benchmark of the dwarf cache.
Target program:
#include <sched.h>
int main(void)
{
unsigned int max = 0x6fff, i;
for (i = 0; i < max; i++)
sched_yield();
return 0;
}
Command line:
./strace -o /dev/null -k a.out
With the dwarf cache:
real 0m12.081s
user 0m3.858s
sys 0m8.194s
Without the dwarf cache:
real 0m22.326s
user 0m5.218s
sys 0m16.952s
Signed-off-by: Masatake YAMATO <yamato@redhat.com>