[PATCH v8 00/12] New filtering architecture
Nikolay Marchuk
marchuk.nikolay.a at gmail.com
Tue Aug 22 06:01:41 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.
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.
Changes since v5:
* Refactored parsing.
* Fixes in fd and path filtering.
* Improved diagnostics.
* Added stacktrace action.
* Style fixes.
Changes since v6:
* Refactored fd and path filtering.
* Fixed memory leaks in parser.
* Fixed some corner cases of parsing.
* Disabled set inversions in new syntax.
* Improved tests.
Changes since v7:
* Improved test coverage.
* Added documentation.
* Implemented global path filtering as injected filter.
Nikolay Marchuk (12):
tests: improve syscall set syntax testing
Introduce new filtering architecture
Improve fd filtering
Optimize default filtering
Implement new filtering language parsing
tests: check expression parsing
tests: check new syntax of inject/fault actions
tests: check fd filter
tests: check path filter
Add stacktrace filter action
Add description of new filtering syntax
Update NEWS
Makefile.am | 5 +
NEWS | 3 +
basic_actions.c | 130 +++++++++
basic_filters.c | 222 +++++++++++-----
defs.h | 21 +-
filter.c | 144 ++++++++++
filter.h | 44 +++-
filter_action.c | 269 +++++++++++++++++++
filter_expression.c | 469 +++++++++++++++++++++++++++++++++
filter_parse.c | 252 ++++++++++++++++++
filter_qualify.c | 286 ++++++++++----------
pathtrace.c | 199 ++++++++------
strace.1.in | 272 ++++++++++++++++++-
strace.c | 19 +-
syscall.c | 30 +--
tests/.gitignore | 2 +
tests/Makefile.am | 11 +
tests/filtering_action-syntax.test | 94 +++++++
tests/filtering_expression-empty.test | 45 ++++
tests/filtering_expression-syntax.test | 76 ++++++
tests/filtering_fd-syntax.test | 76 ++++++
tests/filtering_fd.c | 204 ++++++++++++++
tests/filtering_fd.test | 17 ++
tests/filtering_path.c | 285 ++++++++++++++++++++
tests/filtering_path.test | 18 ++
tests/filtering_syscall-syntax.test | 132 ++++++++++
tests/mmap.test | 18 +-
tests/mmap_name.sh | 51 ++++
tests/options-syntax.test | 28 --
tests/qual_fault-exit_group.test | 11 +
tests/qual_fault-syntax.test | 107 +++-----
tests/qual_fault.test | 49 +++-
tests/qual_inject-error-signal.test | 5 +
tests/qual_inject-retval.test | 5 +
tests/qual_inject-signal.test | 5 +
tests/qual_inject-syntax.test | 125 +++------
tests/tampering-syntax.sh | 64 +++++
unwind.c | 6 +
xmalloc.c | 3 +
39 files changed, 3262 insertions(+), 540 deletions(-)
create mode 100644 basic_actions.c
create mode 100644 filter.c
create mode 100644 filter_action.c
create mode 100644 filter_expression.c
create mode 100644 filter_parse.c
create mode 100755 tests/filtering_action-syntax.test
create mode 100755 tests/filtering_expression-empty.test
create mode 100755 tests/filtering_expression-syntax.test
create mode 100755 tests/filtering_fd-syntax.test
create mode 100644 tests/filtering_fd.c
create mode 100755 tests/filtering_fd.test
create mode 100644 tests/filtering_path.c
create mode 100755 tests/filtering_path.test
create mode 100755 tests/filtering_syscall-syntax.test
create mode 100644 tests/mmap_name.sh
create mode 100644 tests/tampering-syntax.sh
--
2.11.0
More information about the Strace-devel
mailing list