[PATCH v4 0/6] New filtering architecture

Nikolay Marchuk marchuk.nikolay.a at gmail.com
Fri Jul 14 14:55:29 UTC 2017


These patches implement new filtering architecture. Currently supported actions:
trace, inject, fault, read, write, raw, abbrev, verbose. Currently supported
filters: syscall, fd, path. New option for new filters is -m "...".
Changes in filtering language:
* Delimiter of action arguments is now ';'.
* Supported logical operators: and, or, not. Also C-like forms of these 
  operators are supported: &&, ||, !.
* Syscall filter accepts syscalls' set, class or regex with old set description
  syntax.

Changes since v1:
* qualify.c is now splitted in separate commit.

Changes since v2:
* Fixed segmentation fault in inject/fault parsing.
* basic_filters.c (run_fd_filter): Changed returns to true/false.

Changes since v3:
* Fixed invalid accounting of syscalls for inject/fault actions.
* Fixed order of filter actions with same priority.
* Refactored inject arguments parsing.
* Refactored fd filtering.
* Refactored tests for syscall set syntax.
* Improved diagnostics of filtering errors.
* Rewritten algorithms of parsing for new filtering language.

Nikolay Marchuk (6):
  Split qualify.c into basic_filters.c and filter_qualify.c
  Introduce new filtering architecture
  Improve fd filtering
  Optimize default filtering
  Implement new filtering language parsing
  Add path filter

 Makefile.am                         |   9 +-
 basic_actions.c                     | 145 ++++++++
 basic_filters.c                     | 504 ++++++++++++++++++++++++++
 defs.h                              |  14 +-
 filter.c                            | 144 ++++++++
 filter.h                            |  73 ++++
 filter_action.c                     | 245 +++++++++++++
 filter_expression.c                 | 361 +++++++++++++++++++
 filter_parse.c                      | 147 ++++++++
 filter_qualify.c                    | 320 +++++++++++++++++
 pathtrace.c                         | 170 +++++----
 qualify.c                           | 697 ------------------------------------
 strace.c                            |  17 +-
 syscall.c                           |  23 +-
 tests/Makefile.am                   |   1 +
 tests/filtering_syscall-syntax.test | 105 ++++++
 tests/options-syntax.test           |  17 -
 tests/qual_fault-syntax.test        |  17 +-
 tests/qual_inject-syntax.test       |  18 +-
 19 files changed, 2173 insertions(+), 854 deletions(-)
 create mode 100644 basic_actions.c
 create mode 100644 basic_filters.c
 create mode 100644 filter.c
 create mode 100644 filter.h
 create mode 100644 filter_action.c
 create mode 100644 filter_expression.c
 create mode 100644 filter_parse.c
 create mode 100644 filter_qualify.c
 delete mode 100644 qualify.c
 create mode 100755 tests/filtering_syscall-syntax.test

-- 
2.1.4





More information about the Strace-devel mailing list