You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
profiles/seccomp: use conditional (hard-coded) errNoRet for MIPS/non-MIPS
The value of ENOSYS differs between MIPS and non-MIPS architectures. While
this is not problematic for the embedded seccomp profile, it prevents the
profile from being saved as a portable JSON file that can be used for both
architectures.
To work around this situation, we include conditional rules for both arches.
and hard-code the value for ENOSYS in both.
For more details, refer to moby#42836 (comment)
and opencontainers/runtime-spec#1087 (comment)
A test was added, which can be run with:
go test --tags=seccomp -run TestLoadConditionalClone3 -v ./profiles/seccomp/
=== RUN TestLoadConditionalClone3
=== RUN TestLoadConditionalClone3/clone3_default_amd64
=== RUN TestLoadConditionalClone3/clone3_default_mips
=== RUN TestLoadConditionalClone3/clone3_cap_sys_admin_amd64
=== RUN TestLoadConditionalClone3/clone3_cap_sys_admin_mips
--- PASS: TestLoadConditionalClone3 (0.01s)
--- PASS: TestLoadConditionalClone3/clone3_default_amd64 (0.00s)
--- PASS: TestLoadConditionalClone3/clone3_default_mips (0.00s)
--- PASS: TestLoadConditionalClone3/clone3_cap_sys_admin_amd64 (0.00s)
--- PASS: TestLoadConditionalClone3/clone3_cap_sys_admin_mips (0.00s)
PASS
ok github.com/docker/docker/profiles/seccomp 0.015s
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
0 commit comments