This patch adds a seccomp_precompute() API to precompute the seccomp filter prior to calling seccomp_load() or similar functions. Not only does this improve the performance of seccomp_load(), it ensures that seccomp_load() is async-signal-safe if no additional changes have been made since the filter was precomputed.
Coverage increased (+0.07%) to 89.679% when pulling e797591bdd6834272e2db292400f608ed9bd7fab on pcmoore:working-precompute into 94f684f858673365c8dc103affe54de698f63421 on seccomp:main.
This patch adds a seccomp_precompute() API to precompute the seccomp filter prior to calling seccomp_load() or similar functions. Not only does this improve the performance of seccomp_load(), it ensures that seccomp_load() is async-signal-safe if no additional changes have been made since the filter was precomputed.
Resolves #123