diff --git a/config-linux.md b/config-linux.md index 873982fc2..185b45518 100644 --- a/config-linux.md +++ b/config-linux.md @@ -610,7 +610,9 @@ The following parameters can be specified to setup seccomp: * `SCMP_ARCH_PARISC` * `SCMP_ARCH_PARISC64` -* **`syscalls`** *(array of objects, REQUIRED)* - match a syscall in seccomp. +* **`syscalls`** *(array of objects, OPTIONAL)* - match a syscall in seccomp. + + Note that if `defaultAction` is `SCMP_ACT_KILL` and `syscalls` is empty or unset, the kernel will kill the container process on its first syscall. Each entry has the following structure: diff --git a/schema/config-linux.json b/schema/config-linux.json index d51e5b5dd..c12101d00 100644 --- a/schema/config-linux.json +++ b/schema/config-linux.json @@ -251,7 +251,10 @@ "$ref": "defs-linux.json#/definitions/Syscall" } } - } + }, + "required": [ + "defaultAction" + ] }, "sysctl": { "id": "https://opencontainers.org/schema/bundle/linux/sysctl", diff --git a/specs-go/config.go b/specs-go/config.go index 70d708d23..ded283428 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -484,7 +484,7 @@ type WindowsNetworkResources struct { type LinuxSeccomp struct { DefaultAction LinuxSeccompAction `json:"defaultAction"` Architectures []Arch `json:"architectures,omitempty"` - Syscalls []LinuxSyscall `json:"syscalls"` + Syscalls []LinuxSyscall `json:"syscalls,omitempty"` } // Arch used for additional architectures