Support SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV
SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV was added in the Spec v1.1.0-rc.1:
- https://github.com/opencontainers/runtime-spec/pull/1161
The commit https://github.com/seccomp/libseccomp/pull/391 is not in the released version yet, and thus there's no support in libseccomp-golang either.
I think maybe we have two issues to solve before supporting SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV
- libsescomp need a stable release
- How to test the SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV?
About the test, I may have some ideas.
- we may need a new binary for SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV in contrib/cmd/, like old seccompagent
- we can listen to UDS to reach the listener fd. And we should add a new signal handler for SIGUSR1
- In the bash test, we can run the runc binary with SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV like other secomp tests.
- We send a SIGUSR1 for the runc process. We can check if this process is in the D state.
- We send a SIGUSR1 to the new sescomp agent, the agent will make a response for SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV. And the runc process would exits.
- We can check if the process exits correctly.
cc @utam0k
I guess we can have a CI job to run the test with the main branch of libseccomp. Ideally we should wait for libseccomp v2.6 GA, but it doesn't seem planned soon.
Ideally we should wait for libseccomp v2.6 GA, but it doesn't seem planned soon.
Yeah.... I will submit a issue to ask for the release plan