seccomp / libseccomp

The main libseccomp repository
GNU Lesser General Public License v2.1
799 stars 171 forks source link

RFE: add seccomp_precompute() to the API #390

Closed pcmoore closed 2 years ago

pcmoore commented 2 years ago

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

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.07%) to 89.679% when pulling e797591bdd6834272e2db292400f608ed9bd7fab on pcmoore:working-precompute into 94f684f858673365c8dc103affe54de698f63421 on seccomp:main.