CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
allow ptrace(2) by default for kernel >= 4.8 #6810
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
Conversation
Hi @henry118. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Build succeeded.
|
Could you add this information to the headers of the files? |
contrib/seccomp/kernel_linux.go
Outdated
@@ -0,0 +1,78 @@ | |||
//go:build linux | |||
// +build linux | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do not need these lines, as the filename already has _linux.go
suffix
contrib/seccomp/kernel_linux.go
Outdated
limitations under the License. | ||
*/ | ||
|
||
package seccomp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm feeling this should be a separate package like pkg/kernelversion or contrib/seccomp/kernelversion
Updated. |
Build succeeded.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
contrib/seccomp/seccomp_default.go
Outdated
@@ -467,6 +468,18 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { | |||
Syscalls: syscalls, | |||
} | |||
|
|||
// include by kernel version | |||
if ok, err := kernelversion.KernelGreaterEqualThan( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kernelversion.GreatherEqualThan()?
https://go.dev/doc/effective_go#names
For instance, the buffered reader type in the bufio package is called Reader, not BufReader, because users see it as bufio.Reader, which is a clear, concise name.
Signed-off-by: Henry Wang <henwang@amazon.com>
Build succeeded.
|
Allow
ptrace(2)
by default for kernel >= 4.8Fixes: #6802
kernel_linux.go
andkernel_linux_test.go
are copied from moby project under:https://github.com/moby/moby/tree/v20.10.14/profiles/seccomp
Testing was performed on 5.10 kernel with
strace
tool.Signed-off-by: Henry Wang henwang@amazon.com