]> granicus.if.org Git - strace/commit
filter_seccomp: skip seccomp setup when there's nothing to filter
authorPaul Chaignon <paul.chaignon@gmail.com>
Mon, 1 Jul 2019 19:14:15 +0000 (21:14 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 25 Sep 2019 01:02:03 +0000 (01:02 +0000)
commitb238e7b9b94005a2ddcf32636bf7761bcf06bf2f
tree418ce2b258bbfff6c5f2473b8def81408888c7e2
parent5d64f3d7fadb1e4f8528e6c97d6034492a544986
filter_seccomp: skip seccomp setup when there's nothing to filter

If the trace_set set is complete (no syscalls are filtered), seccomp
filtering is disabled.  This patch adds a new is_complete_set_array
function to check whether all sets of a set array are complete.

* number_set.c (is_complete_set_array): New function.
* number_set.h (is_complete_set_array): New prototype.
* filter_seccomp.c (check_seccomp_filter): Skip seccomp setup if there is
nothing to filter.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
filter_seccomp.c
number_set.c
number_set.h