[PATCH v5 0/8] New filtering architecture

Nikolay Marchuk marchuk.nikolay.a at gmail.com
Wed Jul 19 10:26:43 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.

Changes since v4:
* Fixes in fd and path filtering.
* Added tests for fd filtering.
* Syscall tests refactoring is now in a separate commit.
* Style and readability fixes.

Known issues in v4:
* Fd filter returns valid results only if negative fds are not filtered.

Nikolay Marchuk (8):
  Split qualify.c into basic_filters.c and filter_qualify.c
  tests: Refactor syscall syntax testing
  Introduce new filtering architecture
  Improve fd filtering
  Optimize default filtering
  Implement new filtering language parsing
  Add path filter
  tests: check fd filter

 Makefile.am                         |   9 +-
 basic_actions.c                     | 144 ++++++++
 basic_filters.c                     | 509 ++++++++++++++++++++++++++
 defs.h                              |  14 +-
 filter.c                            | 142 ++++++++
 filter.h                            |  74 ++++
 filter_action.c                     | 242 +++++++++++++
 filter_expression.c                 | 360 +++++++++++++++++++
 filter_parse.c                      | 147 ++++++++
 filter_qualify.c                    | 331 +++++++++++++++++
 pathtrace.c                         | 198 +++++-----
 qualify.c                           | 697 ------------------------------------
 strace.c                            |  15 +-
 syscall.c                           |  24 +-
 tests/.gitignore                    |   1 +
 tests/Makefile.am                   |   5 +
 tests/filtering_fd-syntax.test      |  42 +++
 tests/filtering_fd.c                | 158 ++++++++
 tests/filtering_fd.test             |  27 ++
 tests/filtering_syscall-syntax.test |  75 ++++
 tests/options-syntax.test           |  80 +----
 tests/qual_fault-syntax.test        |  17 +-
 tests/qual_inject-syntax.test       |  18 +-
 tests/syntax.sh                     |  81 +++++
 24 files changed, 2485 insertions(+), 925 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_fd-syntax.test
 create mode 100644 tests/filtering_fd.c
 create mode 100755 tests/filtering_fd.test
 create mode 100755 tests/filtering_syscall-syntax.test
 create mode 100644 tests/syntax.sh

-- 
2.1.4





More information about the Strace-devel mailing list