[seccomp/libseccomp] 89644f: bpf: pfc: Add handling for 0 syscalls in the binar...

10 views
Skip to first unread message

Tom Hromatka

unread,
Mar 18, 2022, 2:58:45 PM3/18/22
to libse...@googlegroups.com
Branch: refs/heads/release-2.5
Home: https://github.com/seccomp/libseccomp
Commit: 89644faae8489e9af8363efed0f2904d55d922db
https://github.com/seccomp/libseccomp/commit/89644faae8489e9af8363efed0f2904d55d922db
Author: Tom Hromatka <tom.hr...@oracle.com>
Date: 2022-03-18 (Fri, 18 Mar 2022)

Changed paths:
M src/gen_bpf.c
M src/gen_pfc.c

Log Message:
-----------
bpf: pfc: Add handling for 0 syscalls in the binary tree

Handle the unlikely case where a user has chosen the
binary tree optimization but has zero syscalls in their
filter.

Fixes: https://github.com/seccomp/libseccomp/issues/370
Fixes: a3732b32b8e67 ("bpf:pfc: Add optimization option to use a binary tree")
Signed-off-by: Tom Hromatka <tom.hr...@oracle.com>
Acked-by: Paul Moore <pa...@paul-moore.com>
(cherry picked from commit 2de3b87122c18b58b3e2b32ab2e81ac43774a7aa)


Commit: faf98d74c728fad239d7dca85675e409fc706374
https://github.com/seccomp/libseccomp/commit/faf98d74c728fad239d7dca85675e409fc706374
Author: Tom Hromatka <tom.hr...@oracle.com>
Date: 2022-03-18 (Fri, 18 Mar 2022)

Changed paths:
M tests/53-sim-binary_tree.py

Log Message:
-----------
tests: fix 53-sim-binary_tree to use binary tree

SCMP_FLTATR_CTL_OPTIMIZE = 2 was not being set for test
53-sim-binary_tree.py. Set the optimization level to 2 to
ensure that the binary tree is being employed.

Fixes: 38f04da84748 ("tests: add tests for the binary tree")
Signed-off-by: Tom Hromatka <tom.hr...@oracle.com>
Acked-by: Paul Moore <pa...@paul-moore.com>
(cherry picked from commit c1c2e28520689779626dbbad8f11866b9b962748)


Commit: 9e46db3f6ab0e57001cf9e47d6a23dc5dc516009
https://github.com/seccomp/libseccomp/commit/9e46db3f6ab0e57001cf9e47d6a23dc5dc516009
Author: Tom Hromatka <tom.hr...@oracle.com>
Date: 2022-03-18 (Fri, 18 Mar 2022)

Changed paths:
M tests/.gitignore
A tests/59-basic-empty_binary_tree.c
A tests/59-basic-empty_binary_tree.py
A tests/59-basic-empty_binary_tree.tests
M tests/Makefile.am

Log Message:
-----------
tests: Add a binary tree test with zero syscalls

Add a test that exercises the binary tree optimization but
the seccomp filter has zero syscalls in it.

Related-bug: https://github.com/seccomp/libseccomp/issues/370
Signed-off-by: Tom Hromatka <tom.hr...@oracle.com>
Acked-by: Paul Moore <pa...@paul-moore.com>
(cherry picked from commit 5731dd9f73df9025b2c8924e2f4ce78a7d94af00)


Compare: https://github.com/seccomp/libseccomp/compare/2b998990f3ac...9e46db3f6ab0
Reply all
Reply to author
Forward
0 new messages