-
Hi, I was analyzing runc’s init process and observed the following logs:
The last seccomp call seems to correspond to the actual filter installation, but what are the preceding calls for? I could not find a direct reference to these calls in the runc source code, nor any usage of SECCOMP_SET_MODE_STRICT or similar constants. Could someone clarify:
Any pointers would be appreciated. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It might be more helpful to use Note we do not call EDIT: Sorry, we do call |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply! I really appreciate it. The
Since the third argument is null, as you mentioned, this looks like some kind of probing procedure. The first nine calls happen during configuration:
The last call seems to install the filter: Why does the configuration phase use libseccomp, while the actual filter installation uses a direct RawSyscall? |
Beta Was this translation helpful? Give feedback.
It might be more helpful to use
strace -f -e seccomp
to get the arguments as well, but my guess is that this is for kernel feature detection.Note we do not call
seccomp(2)
directly in runc, instead we use the official Go bindings forlibseccomp
so you'll need to look atlibseccomp
to see what they're doing.EDIT: Sorry, we do call
seccomp(2)
at the end to load the filter because we have code to patch the filter generated by libseccomp. See #2750.