-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
KEP-2413: Graduate SeccompDefault to stable #3718
KEP-2413: Graduate SeccompDefault to stable #3718
Conversation
9ffc575
to
1474c2a
Compare
/lgtm |
/lgtm |
@derekwaynecarr ptal |
From what I understand, no actual code changes are required as part of this move. /approve |
@kubernetes/production-readiness PTAL |
Github doesn't let me comment on arbitrary lines, so I'm leaving some general feedback here:
From a PRR perspective, this LGTM. |
Hey @tallclair, thank you for raising those questions!
CRI-O and containerd will still apply unconfined (aka nothing), because the seccomp paths are guarded by the privileged check:
I was thinking back and forth about this feature about making it API aware. The fact that we designed it as kubelet feature makes it easily configurable for cluster admins on a per-node basis, but also less visible to end users. If this feature is stable and we have a good user base adopting it (let's say 2-3 released), then we could think about introducing a similar feature in the API server. |
Thanks. /lgtm |
Just to confirm, with this graduating to stable, users will still need to opt-in by configuring their kubelets with I ask since I am aware of some performance regressions when running with seccomp enabled with some workloads, specifically with spectre mitigations. There were some discussions around disabling those mitigations with seccomp on the container runtime side, but I don't think they were completed. Namely:
It also looks like Linux 5.16 has changed some of the defaults regarding seccomp with this patch (xref: https://lore.kernel.org/lkml/[email protected]/)
I haven't tested the perf changes with that patch, but it may be something we should document, as there is no stable kernel release with that patch yet, so most users will not have it and possibly have performance degradations as a result. |
/approve holding for and answer to @bobbypage's question. I don't think an already fixed performance degradation changes the PRR answers, but it's worth addressing. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, derekwaynecarr, mrunalp, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No, the main goal of the graduation is to switch Users should now configure their kubelets to opt-out either by using the feature gate or the configuration option if they don't want to use it.
I agree we should document the performance impact of seccomp on k/website, I can take care of that during the graduation of the feature. |
I am 👍 on enabling by default. This is the performance vs. security tradeoff and we can choose security while giving admins opt out if they prefer performance. (A bunch of CVEs would have been avoided if seccomp were enabled by default.) |
I am ok with the default on from the security perspective. But as pointed by @bobbypage at #3718 (comment), we should
|
Some work that went into runc for perf - opencontainers/runc#3588 |
From the kernel link:
|
Thanks all for discussion. I performed a bit of adhoc testing:
This is latest COS OS, with latest 5.15 stable kernel. I ran pybench benchmark as recommend in this article. I'm not sure how representative this benchmark is, but it seems like a common python bechmark:
So with seccomp enabled out of the box, the perf impact is pretty significant, ~ 1.5x worse. Applying the kernel command line changes as was done in the above kernel patch of setting: (
The results are much better and equivalent to running without seccomp before. The kernel patch will change defaults to make it the default in newer kernels but it was not back ported to the latest 5.15 kernel yet. The runc patches will also accomplish the same effect of disabling those mitigations, but will require folks to use the newer runc. I'm also supportive to enable this for security improvements, and it's great to see we have mitigation in place for perf impact, but we need to communicate it clearly to users that they should either: (1) update to newer kernel with that patch ... to ensure they will not be impacted by any possible perf regressions. |
We now graduate `SeccompDefault` to stable by basically making the feature enabled by default. Signed-off-by: Sascha Grunert <[email protected]>
1474c2a
to
14d5f66
Compare
Thank you for all the inputs, I added a new section to the "Beta to GA Graduation" to contain all the documentation bits. |
@mrunalp @bobbypage @derekwaynecarr @dchen1107 can we merge this one now? I don't see any outstanding points left. |
/lgtm |
@deads2k Are you okay removing the hold? |
Yes, thank you for the updates. /hold cancel |
SeccompDefault
to stable by basically making the feature enabled by default.