Repository navigation
Conversation
kolyshkin
force-pushed
the
seccomp-errnoret
branch
from
October 19, 2026 06:30
ec6982f to
99ac547
Compare
cyphar
approved these changes
Oct 20, 2026
Comment on lines
+532
to
+534
| supportsErrno := func(a configs.Action) bool { | ||
| return a == configs.Errno || a == configs.Trace | ||
| } |
Member
There was a problem hiding this comment.
nit: Feels like it doesn't need to be a nested function.
Contributor
Author
There was a problem hiding this comment.
This is mostly for readability. Go compiler inlines it anyway.
Member
|
And yeah I much prefer this to #5559. |
kolyshkin
force-pushed
the
seccomp-errnoret
branch
from
October 25, 2026 06:03
99ac547 to
bdf12e2
Compare
Contributor
Author
|
This needs a second LGTM @AkihiroSuda @thaJeztah |
The runtime spec says about both defaultErrnoRet and errnoRet: > When the action doesn't support an errno, the runtime MUST print and > error and fail. Yet runc silently ignores errnoRet set for any action other than SCMP_ACT_ERRNO and SCMP_ACT_TRACE. Add a check to the config validator, so the error is reported early (before the container init is started) and clearly (including the syscall name in case of errnoRet). Since the validator checks all syscall rules, this also covers ones which are later skipped as redundant (i.e. having the same action as the default). Add unit and integration tests, and a CHANGELOG entry. Reported in issue 5550. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
force-pushed
the
seccomp-errnoret
branch
from
October 28, 2026 06:03
bdf12e2 to
8a3685e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The runtime spec says about both
defaultErrnoRetanderrnoRet:Yet runc silently ignores
errnoRetset for any action other thanSCMP_ACT_ERRNOandSCMP_ACT_TRACE.Add a check to the config validator, so the error is reported early (before the container init is started) and clearly (including the syscall name in case of
errnoRet), e.g.:Since the validator checks all syscall rules, this also covers ones which are later skipped as redundant (i.e. having the same action as the default).
Note this is a (spec-mandated) behavior change: configs which were silently accepted before will now be rejected. A CHANGELOG entry is added.
Add unit and integration tests (the latter fails without the fix).
Fixes #5550. This is an alternative to #5559.