-
Notifications
You must be signed in to change notification settings - Fork 160
generate/seccomp: platform independent values #561
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // +build linux | ||
|
|
||
| package seccomp | ||
|
|
||
| import "syscall" | ||
|
|
||
| // System values passed through on linux | ||
| const ( | ||
| CloneNewIPC = syscall.CLONE_NEWIPC | ||
| CloneNewNet = syscall.CLONE_NEWNET | ||
| CloneNewNS = syscall.CLONE_NEWNS | ||
| CloneNewPID = syscall.CLONE_NEWPID | ||
| CloneNewUser = syscall.CLONE_NEWUSER | ||
| CloneNewUTS = syscall.CLONE_NEWUTS | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // +build !linux | ||
|
|
||
| package seccomp | ||
|
|
||
| // These are copied from linux/amd64 syscall values, as a reference for other | ||
| // platforms to have access to | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If these values were amd64-specific, that would be a problem, because folks generating configs for other arches from non-Linux systems would get the wrong values. But it turns out that these values are arch-independent. Maybe adjust this comment to point that out, possibly linking to the kerrnel? |
||
| const ( | ||
| CloneNewIPC = 0x8000000 | ||
| CloneNewNet = 0x40000000 | ||
| CloneNewNS = 0x20000 | ||
| CloneNewPID = 0x20000000 | ||
| CloneNewUser = 0x10000000 | ||
| CloneNewUTS = 0x4000000 | ||
| CloneNewCgroup = 0x02000000 | ||
| ) | ||
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.
syscallis end-of-life:We already vendor
golang.org/x/syshere; can we use that instead?