-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix seccomp notify inconsistencies #1096
Fix seccomp notify inconsistencies #1096
Conversation
This wasn't catched before, even though we had working patches for containerd and runc in advance, as neither containerd nor runc really use these consts. In the spec this field is a string[1] and therefore when containerd parses with json.Unmarshall[2] it works just fine. With runc is not used either, as it uses a different struct in the libcontainer directory[3]. Therefore, even with patches using this change, this const definition was missed as it is not used by the patches. [1]: https://github.com/opencontainers/runtime-spec/blob/a8c4a9ee0f6b5a0b994c5c23c68725394e2b0d9d/specs-go/config.go#L641 [2]: https://github.com/containerd/containerd/blob/8dbe53a2a930af3631229e4d92cf839b64ee5a38/contrib/seccomp/seccomp.go#L36-L40 [3]: https://github.com/opencontainers/runc/pull/2682/files#diff-9915e69bab45a993d366aad4a7d47459d73ec4304b7c33942f197dd221673376R51 [4]: https://github.com/opencontainers/runtime-spec/blob/a8c4a9ee0f6b5a0b994c5c23c68725394e2b0d9d/specs-go/config.go#L614 Signed-off-by: Rodrigo Campos <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Commit "Add Seccomp Notify support" (58798e7) just added SECCOMP_FILTER_FLAG_NEW_LISTENER to the schema and not to the list of flags in config-linux.md. However, it was a mistake to add them to the schema, as the user will never really need to specify that flag. Signed-off-by: Rodrigo Campos <[email protected]>
8b43023
to
0f84938
Compare
@giuseppe Thanks! Pushed another fix to another inconsistency, removing SECCOMP_FILTER_FLAG_NEW_LISTENER from the valid flags. That should have never been added there in the first place 🙈 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In PR #1074 I missed some consts, sorry!
Funny thing is we didn't catch them even when we used this in runc and containerd patches because containerd just passes a string (see commit for a detailed explanation) and runc doesn't use these constants (again, full explanation in the commit msg).
cc @vbatts @giuseppe as you LGTM to #1074.