Hearing no objections to yesterday's query about moving to a context
aware API, I put together an initial patchset. I still need to go
over it a few more times but I wanted to send this out in case
anyone had any comments.
---
Paul Moore (4):
api: remove the internal state and make the API context-aware
tests: add a test for the seccomp_reset() API
doc: update the API to reflect the new filter context parameter
db: add a filter initialization check
doc/man/man3/seccomp_attr_set.3 | 33 ++++++---
doc/man/man3/seccomp_export_bpf.3 | 24 ++++--
doc/man/man3/seccomp_init.3 | 37 ++++++----
doc/man/man3/seccomp_load.3 | 23 ++++--
doc/man/man3/seccomp_release.3 | 21 ++++--
doc/man/man3/seccomp_rule_add.3 | 30 +++++---
doc/man/man3/seccomp_syscall_priority.3 | 23 ++++--
include/seccomp.h | 54 ++++++++++-----
src/api.c | 115 +++++++++++++++++--------------
src/db.c | 80 ++++++++++++++++++----
src/db.h | 8 ++
tests/.gitignore | 1
tests/01-allow.c | 9 +-
tests/02-basic.c | 20 +++--
tests/03-basic-chains.c | 20 +++--
tests/04-multilevel-chains.c | 24 ++++--
tests/05-long-jumps.c | 18 +++--
tests/06-actions.c | 20 +++--
tests/07-db-bug-looping.c | 15 ++--
tests/08-subtree-checks.c | 55 ++++++++-------
tests/09-syscall-priority-pre.c | 23 ++++--
tests/10-syscall-priority-post.c | 23 ++++--
tests/11-basic-errors.c | 112 ++++++++++++++++--------------
tests/12-basic-masked-ops.c | 21 +++---
tests/13-attrs.c | 19 +++--
tests/14-reset.c | 62 +++++++++++++++++
tests/14-reset.tests | 24 ++++++
tests/Makefile | 3 +
tests/util.c | 8 +-
tests/util.h | 3 +
30 files changed, 597 insertions(+), 331 deletions(-)
create mode 100644 tests/14-reset.c
create mode 100644 tests/14-reset.tests
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libseccomp-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libseccomp-discuss