]> granicus.if.org Git - strace/commit
unwind: introduce markers specifying the needs of special care in unwinding
authorMasatake YAMATO <yamato@redhat.com>
Wed, 16 Apr 2014 06:33:11 +0000 (15:33 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 30 May 2014 22:57:56 +0000 (22:57 +0000)
commit1d78d22058da04eac7bf726c059d5c3fb193da08
tree49677db6285348e423aa0511a3fb3df131c3b3c1
parenta0b4ee7b38e600f28e547585e754b7737b388d90
unwind: introduce markers specifying the needs of special care in unwinding

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>
defs.h
syscall.c