summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-12 20:47:44 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-12 20:47:44 +0000
commitfbc3a3d984eb113f7487e38ba55e5f813fc72aec (patch)
treed22a96c80f5f9a35c71687740e35c0021475d428 /pkg/abi/linux
parent1ea6658d24215e9fbcdb693b00884e1bdbdcc95d (diff)
parent4e03e87547853523d4ff941935a6ef1712518c61 (diff)
Merge release-20201216.0-87-g4e03e8754 (automated)
Diffstat (limited to 'pkg/abi/linux')
-rw-r--r--pkg/abi/linux/fadvise.go1
-rw-r--r--pkg/abi/linux/ipc.go14
-rw-r--r--pkg/abi/linux/netfilter_ipv6.go1
-rw-r--r--pkg/abi/linux/sched.go1
-rw-r--r--pkg/abi/linux/seccomp.go2
-rw-r--r--pkg/abi/linux/sem.go5
6 files changed, 19 insertions, 5 deletions
diff --git a/pkg/abi/linux/fadvise.go b/pkg/abi/linux/fadvise.go
index b06ff9964..97e2e4532 100644
--- a/pkg/abi/linux/fadvise.go
+++ b/pkg/abi/linux/fadvise.go
@@ -14,6 +14,7 @@
package linux
+// Fadvise constants.
const (
POSIX_FADV_NORMAL = 0
POSIX_FADV_RANDOM = 1
diff --git a/pkg/abi/linux/ipc.go b/pkg/abi/linux/ipc.go
index c6e65df62..f84144355 100644
--- a/pkg/abi/linux/ipc.go
+++ b/pkg/abi/linux/ipc.go
@@ -14,8 +14,9 @@
package linux
-// Control commands used with semctl, shmctl, and msgctl. Source:
-// include/uapi/linux/ipc.h.
+// Control commands used with semctl, shmctl, and msgctl.
+//
+// Source: include/uapi/linux/ipc.h.
const (
IPC_RMID = 0
IPC_SET = 1
@@ -23,14 +24,19 @@ const (
IPC_INFO = 3
)
-// resource get request flags. Source: include/uapi/linux/ipc.h
+// Resource get request flags.
+//
+// Source: include/uapi/linux/ipc.h
const (
IPC_CREAT = 00001000
IPC_EXCL = 00002000
IPC_NOWAIT = 00004000
)
-const IPC_PRIVATE = 0
+// IPC flags.
+const (
+ IPC_PRIVATE = 0
+)
// In Linux, amd64 does not enable CONFIG_ARCH_WANT_IPC_PARSE_VERSION, so SysV
// IPC unconditionally uses the "new" 64-bit structures that are needed for
diff --git a/pkg/abi/linux/netfilter_ipv6.go b/pkg/abi/linux/netfilter_ipv6.go
index 6d31eb5e3..bcb57642e 100644
--- a/pkg/abi/linux/netfilter_ipv6.go
+++ b/pkg/abi/linux/netfilter_ipv6.go
@@ -288,6 +288,7 @@ type IP6TIP struct {
_ [3]byte
}
+// SizeOfIP6TIP is the size of an IP6 header.
const SizeOfIP6TIP = 136
// Flags in IP6TIP.Flags. Corresponding constants are in
diff --git a/pkg/abi/linux/sched.go b/pkg/abi/linux/sched.go
index 70e820823..2a67921e6 100644
--- a/pkg/abi/linux/sched.go
+++ b/pkg/abi/linux/sched.go
@@ -29,6 +29,7 @@ const (
SCHED_RESET_ON_FORK = 0x40000000
)
+// Scheduling priority group selectors.
const (
PRIO_PGRP = 0x1
PRIO_PROCESS = 0x0
diff --git a/pkg/abi/linux/seccomp.go b/pkg/abi/linux/seccomp.go
index 5be3f10f9..e64501fac 100644
--- a/pkg/abi/linux/seccomp.go
+++ b/pkg/abi/linux/seccomp.go
@@ -30,8 +30,10 @@ const (
SECCOMP_GET_ACTION_AVAIL = 2
)
+// BPFAction is an action for a BPF filter.
type BPFAction uint32
+// BPFAction definitions.
const (
SECCOMP_RET_KILL_PROCESS BPFAction = 0x80000000
SECCOMP_RET_KILL_THREAD BPFAction = 0x00000000
diff --git a/pkg/abi/linux/sem.go b/pkg/abi/linux/sem.go
index 2424884c1..bc7b4f0ee 100644
--- a/pkg/abi/linux/sem.go
+++ b/pkg/abi/linux/sem.go
@@ -49,7 +49,10 @@ const (
SEMUSZ = 20
)
-const SEM_UNDO = 0x1000
+// Semaphore flags.
+const (
+ SEM_UNDO = 0x1000
+)
// Sembuf is equivalent to struct sembuf.
//