* defs.h (QUAL_STACKTRACE): Add new qual flag.
(stacktrace): Add macro for checking QUAL_STACKTRACE.
(stack_trace_enabled): Change description.
* filter_action.c (action_types): Declare and add new filter action type.
(update_default_flags): Update stack_trace_enabled.
* strace.c
This change introduces new filtering architecture primitives: filter,
filter_action and bool_expression. Filtering is now done after decoding of
syscall and tcp->qual_flg stores filtering results.
* basic_actions.c: New file.
* basic_filters.c (number_isset): Return bool.
(add_number_to_set):
* basic_filters.c (parse_set, parse_syscall_set): Use set inversion only in
qualify mode.
* filter.h (parse_filter_action, parse_qualify_action,
parse_filter_expression): Add new declarations.
* filter_action.c (parse_filter_action): Add new parsing function.
(filtering_parse_finish): Use
* tests/filtering_fd-syntax.test: New file.
* tests/filtering_fd.c: Likewise.
* tests/filtering_fd.test: Likewise.
* tests/options-syntax.test: Remove fd filtering checks.
* tests/.gitignore: Add filtering_fd.
* tests/Makefile.am (check_PROGRAMS): Add filtering_fd.
(MISC_TESTS): Add
* filter_action.c (default_flags): Add default flags variable.
(add_action): Update default flags.
(filter_syscall): Add default_flags to qual_flg.
(filtering_parse_finish): Init trace action for pathtracing.
* strace.c (init): Remove default filters.
---
filter_action.c | 10 ++
strace.c
* basic_filters.c: Add path filter functions.
* filter.c (filter_types): Add path filter entries.
* pathtrace.c (storepath): Duplicate path.
---
basic_filters.c | 30 ++
filter.c| 2 ++
pathtrace.c | 2 +-
3 files changed, 33 insertions(+), 1 deletion(-)
* tests/filtering_syscall-syntax.test: New file.
* tests/syntax.sh: New file.
* tests/options-syntax.test: Move syscall syntax testing to
filtering_syscall-syntax.test. Move check_* functions to syntax.sh.
* tests/Makefile.am (MISC_TESTS): Add filtering_syscall-syntax.test.
(EXTRA_DIST): Add
* pathtrace.c (match_fd_common, pathtrace_match_set): Move fd matching to
separate function.
* filter.h (match_fd_common): Add new declaration.
* basic_filters.c (run_fd_filter): Use match_fd_common for fd filter.
---
basic_filters.c | 27 ++--
filter.h| 2 +
pathtrace.c | 197
These patches implement new filtering architecture. Currently supported actions:
trace, inject, fault, read, write, raw, abbrev, verbose. Currently supported
filters: syscall, fd, path.
Changes in filtering language:
* Delimiter of action arguments is now ';'.
* Supported logical operators: and,
On Thu, Aug 10, 2017 at 09:04:52AM +0800, JingPiao Chen wrote:
> * rtnl_addr.c: New file.
> * Makefile.am (strace_SOURCES): Add it.
> * configure.ac (AC_CHECK_HEADERS): Add linux/if_addr.h.
> * netlink_route.h (decode_ifaddrmsg): New prototype.
> * netlink_route.c (route_decoders): Add
On Thu, Aug 10, 2017 at 09:07:06AM +0800, JingPiao Chen wrote:
> * rtnl_neigh.c: New file.
> * Makefile.am (strace_SOURCES): Add it.
> * netlink_route.h (decode_ndmsg, decode_rtm_getneigh): New prototypes.
> * configure.ac (AC_CHECK_HEADERS): Add linux/neighbour.h.
> * netlink_route.c
On Thu, Aug 10, 2017 at 09:07:07AM +0800, JingPiao Chen wrote:
> * tests/netlink_route.c (test_rtnl_neigh): New function.
> (main): Use it.
>
> Co-authored-by: Fabien Siron
> ---
> tests/netlink_route.c | 21 +
> 1 file changed, 21 insertions(+)
>
>
On Thu, Aug 10, 2017 at 09:03:22AM +0800, JingPiao Chen wrote:
> Note:
>
> rule:
> Before v2.6.18-284-g14c0b97, rule carry struct rtmsg,
> now carry struct fib_rule_hdr.
>
> $ man 7 rtnetlink # or read the old kernel
> RTM_NEWRULE, RTM_DELRULE, RTM_GETRULE
> Add, delete or retrieve a
On Thu, Aug 10, 2017 at 09:04:54AM +0800, JingPiao Chen wrote:
> * netlink_route.c: New file.
> * Makefile.am (strace_SOURCES): Add it
> * netlink_route.h (decode_rtmsg): New prototype.
> * netlink_route.c (route_decoders): Add RTM_DELROUTE,
> RTM_GETROUTE, and RTM_NEWROUTE.
> *
14 matches
Mail list logo