runc
runc copied to clipboard
Look into using gvisor.dev/gvisor/pkg/seccomp
Apparently, https://pkg.go.dev/gvisor.dev/gvisor/pkg/seccomp can potentially be used (instead of libseccomp / libseccomp-golang) to implement seccomp in runc. Need to look into it.
Looks like we will have to add a few arch-specific constants to support ppc64le, s390x, arm (32-bit), and other minor architectures.
I don't like the mega dependency on gvisor.dev/gvisor/pkg/*.
https://github.com/google/gvisor/blob/e0e9a19bffcb4fd4e545d3942104734f4d911f92/pkg/seccomp/seccomp_unsafe.go#L23
https://github.com/google/gvisor/blob/e0e9a19bffcb4fd4e545d3942104734f4d911f92/pkg/abi/linux/linux_amd64_abi_autogen_unsafe.go#L15-L17
Probably, we should fork gvisor.dev/gvisor/pkg/seccomp and its minimum dependency to another repo. (opencontainers/go-seccomp? moby/sys/seccomp? Or just opencontainers/runc/libcontainer/seccomp?)
This is my simple interest, what is the reason you want to change the seccomp library? Are there any hard spots?
This is my simple interest, what is the reason you want to change the seccomp library? Are there any hard spots?
Cross-compilation is often cumbersome with cgo. Also, distros' libseccomp is often outdated and lacks support for recently added syscalls
I got it. I'm interested in contributing to runc. If I have a chance to try it, I'd like to take it.
Removed from v1.2.0 milestone, but contribution is still welcome
Sorry, I forgot about this issue. Can I try it already? If yes, please assign me 😍
@utam0k Assigned
@AkihiroSuda Thanks!
- [ ] seccompagent.go
- [ ] seccomp_test.go
- [ ] seccomp_linux.go
- [ ] ecosys_linux.go
- [ ] seccomp_internal.go
@kolyshkin @AkihiroSuda Sorry for the delayed reply. I looked into gvisor.dev/gvisor/pkg/seccomp a little. I found some problems with using instead of libeseccomp-golang
- Doesn't support seccomp notify
- Only little endian systems are supported
WDYT? How can I process this issue?
@utam0k
Thank you for taking a look at this.
I think it is ok to fork the repo for implementing the missing features.
Forking seems also almost necessary to get rid of the mega dependencies on gvisor.dev/gvisor/pkg/*: https://github.com/opencontainers/runc/issues/3388#issuecomment-1047392611