Conversation
0656e8f to
93a35d2
Compare
|
thanks @runcom |
93a35d2 to
702b306
Compare
702b306 to
c72bff2
Compare
|
failing tests are about the forward compatibility of the old profile - I'll fix them |
c72bff2 to
0cbc17d
Compare
0cbc17d to
cd51dc4
Compare
|
CI should be now failing only on vendor (except flakes of course) (I don't remember what status/failing-ci is for, was it for flakes right? otherwise I can see if a PR has failing CI by just looking at the global Pull Requests page looking for a red cross) |
cd51dc4 to
ca801f5
Compare
|
cc @jfrazelle as well |
|
just a note, names are really arbitrary (includes, excludes are ugly to me) but didn't find any better, feel free to suggest others |
|
/cc'ing @cyphar as well |
profiles/seccomp/default.json
Outdated
There was a problem hiding this comment.
Can you add a comment here eg "s390 parameter ordering for clone is different" as we have comments!
72bc4f3 to
431e4ae
Compare
|
ping @justincormack |
|
@thaJeztah @justincormack @icecrime are there any plan to have this in 1.13? |
|
Yes definitely. I think its fine now. Was going to add a few more tests but LGTM. |
|
engine-api change merged so you can fix vendoring |
|
@justincormack doing it right now - though, talking to @vdemeester to create another PR because the vendoring changes a lot in docker/docker overall and probably needs its own PR |
|
@runcom yes that makes sense |
431e4ae to
c7d16f0
Compare
|
@justincormack @vdemeester removed the vendor commit and created #26200 - I'll rebase this one after that's merged. |
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
c7d16f0 to
5ff21ad
Compare
|
@justincormack @vdemeester rebased after #26200 merge |
|
Needs some more LGTM cc @estesp @vdemeester |
|
LGTM 🐸 |
|
cc @cpuguy83 |
|
All green... |
|
🎉 |
|
I spotted an incoherency in the expected JSON format: "archMap": [{
"architecture": "SCMP_ARCH_X86_64",
"subArchitectures": [
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
]
}],
...
"includes": {
"arches": [
"s390",
"s390x"
]
},That is, |
|
@nodakai could you open a separate issue for discussing? (Also what you think it should looks like?) |
- What I did
Note that this change is fully backward compatible, people can still use the current seccomp profile json format
I've modified the json seccomp profile format to be more expressive and to allow conditionals with filters. Syscall names can now also be grouped together if they have same action,args,includes,excludes.
includesare ORed whileexcludesareany of. Conditionals can be expressed on architectures and capabilities also. See following examples of new format:- How I did it
vim
- How to verify it
You can run containers with
--seccomp-profile=$DOCKERSRC/profiles/seccomp/default.jsonand tweak it to verify seccomp rules are ok when running containers.- Description for the changelog
New seccomp json format
- A picture of a cute animal (not mandatory but encouraged)
Following from #24221, this is a proposal about defining a new and more expressive (even if more verbose) seccomp json profile.
/cc @justincormack @jfrazelle @rhatdan @mheon @thaJeztah @LK4D4
TODO:
the stuff I've removed from this list should be done in a follow up or re-writing #24221
profiles/seccomp/default.jsonhash based check to detect if running with Docker's default profiledocker info enhancement from daemon: add a flag to override the default seccomp profile #24221teach the daemon to read from/etc/docker/seccomp.jsondaemon: add a flag to override the default seccomp profile #24221 (comment) instead of embedding the profile in code (might actually be still ok to override in daemon?)NOTE: it's not as big as it seems, the actual files changed are just 7, the rest is syscall definitions and the json 😸
Signed-off-by: Antonio Murdaca runcom@redhat.com