summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/abi')
-rw-r--r--pkg/abi/abi_linux.go1
-rw-r--r--pkg/abi/linux/arch_amd64.go1
-rw-r--r--pkg/abi/linux/clone.go25
-rw-r--r--pkg/abi/linux/epoll_amd64.go1
-rw-r--r--pkg/abi/linux/epoll_arm64.go1
-rw-r--r--pkg/abi/linux/file_amd64.go1
-rw-r--r--pkg/abi/linux/file_arm64.go1
-rw-r--r--pkg/abi/linux/ptrace_amd64.go1
-rw-r--r--pkg/abi/linux/ptrace_arm64.go1
-rw-r--r--pkg/abi/linux/sem_amd64.go1
-rw-r--r--pkg/abi/linux/sem_arm64.go1
11 files changed, 34 insertions, 1 deletions
diff --git a/pkg/abi/abi_linux.go b/pkg/abi/abi_linux.go
index 3059479bd..008bbca08 100644
--- a/pkg/abi/abi_linux.go
+++ b/pkg/abi/abi_linux.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build linux
// +build linux
package abi
diff --git a/pkg/abi/linux/arch_amd64.go b/pkg/abi/linux/arch_amd64.go
index 0be31e755..064c0a6da 100644
--- a/pkg/abi/linux/arch_amd64.go
+++ b/pkg/abi/linux/arch_amd64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build amd64
// +build amd64
package linux
diff --git a/pkg/abi/linux/clone.go b/pkg/abi/linux/clone.go
index c2cbfca5e..322a4ef5a 100644
--- a/pkg/abi/linux/clone.go
+++ b/pkg/abi/linux/clone.go
@@ -16,13 +16,16 @@ package linux
// Clone constants per clone(2).
const (
+ CSIGNAL = 0xff
+
CLONE_VM = 0x100
CLONE_FS = 0x200
CLONE_FILES = 0x400
CLONE_SIGHAND = 0x800
- CLONE_PARENT = 0x8000
+ CLONE_PIDFD = 0x1000
CLONE_PTRACE = 0x2000
CLONE_VFORK = 0x4000
+ CLONE_PARENT = 0x8000
CLONE_THREAD = 0x10000
CLONE_NEWNS = 0x20000
CLONE_SYSVSEM = 0x40000
@@ -32,10 +35,30 @@ const (
CLONE_DETACHED = 0x400000
CLONE_UNTRACED = 0x800000
CLONE_CHILD_SETTID = 0x1000000
+ CLONE_NEWCGROUP = 0x2000000
CLONE_NEWUTS = 0x4000000
CLONE_NEWIPC = 0x8000000
CLONE_NEWUSER = 0x10000000
CLONE_NEWPID = 0x20000000
CLONE_NEWNET = 0x40000000
CLONE_IO = 0x80000000
+
+ // Only passable via clone3(2).
+ CLONE_CLEAR_SIGHAND = 0x100000000
+ CLONE_INTO_CGROUP = 0x200000000
)
+
+// CloneArgs is struct clone_args, from include/uapi/linux/sched.h.
+type CloneArgs struct {
+ Flags uint64
+ Pidfd uint64
+ ChildTID uint64
+ ParentTID uint64
+ ExitSignal uint64
+ Stack uint64
+ StackSize uint64
+ TLS uint64
+ SetTID uint64
+ SetTIDSize uint64
+ Cgroup uint64
+}
diff --git a/pkg/abi/linux/epoll_amd64.go b/pkg/abi/linux/epoll_amd64.go
index 7e74b1143..7d5b9fdfb 100644
--- a/pkg/abi/linux/epoll_amd64.go
+++ b/pkg/abi/linux/epoll_amd64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build amd64
// +build amd64
package linux
diff --git a/pkg/abi/linux/epoll_arm64.go b/pkg/abi/linux/epoll_arm64.go
index a35939cc9..5e5960d32 100644
--- a/pkg/abi/linux/epoll_arm64.go
+++ b/pkg/abi/linux/epoll_arm64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build arm64
// +build arm64
package linux
diff --git a/pkg/abi/linux/file_amd64.go b/pkg/abi/linux/file_amd64.go
index 6b72364ea..ab404b17e 100644
--- a/pkg/abi/linux/file_amd64.go
+++ b/pkg/abi/linux/file_amd64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build amd64
// +build amd64
package linux
diff --git a/pkg/abi/linux/file_arm64.go b/pkg/abi/linux/file_arm64.go
index 6492c9038..6234955ab 100644
--- a/pkg/abi/linux/file_arm64.go
+++ b/pkg/abi/linux/file_arm64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build arm64
// +build arm64
package linux
diff --git a/pkg/abi/linux/ptrace_amd64.go b/pkg/abi/linux/ptrace_amd64.go
index e722971f1..e970b5b4a 100644
--- a/pkg/abi/linux/ptrace_amd64.go
+++ b/pkg/abi/linux/ptrace_amd64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build amd64
// +build amd64
package linux
diff --git a/pkg/abi/linux/ptrace_arm64.go b/pkg/abi/linux/ptrace_arm64.go
index 3d0906565..91e5af56b 100644
--- a/pkg/abi/linux/ptrace_arm64.go
+++ b/pkg/abi/linux/ptrace_arm64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build arm64
// +build arm64
package linux
diff --git a/pkg/abi/linux/sem_amd64.go b/pkg/abi/linux/sem_amd64.go
index ab980cb4f..cabd2d4b8 100644
--- a/pkg/abi/linux/sem_amd64.go
+++ b/pkg/abi/linux/sem_amd64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build amd64
// +build amd64
package linux
diff --git a/pkg/abi/linux/sem_arm64.go b/pkg/abi/linux/sem_arm64.go
index 521468fb1..a0c467dc4 100644
--- a/pkg/abi/linux/sem_arm64.go
+++ b/pkg/abi/linux/sem_arm64.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+//go:build arm64
// +build arm64
package linux