You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config-linux.md
+56-1Lines changed: 56 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -629,6 +629,21 @@ The following parameters can be specified to set up seccomp:
629
629
*`SECCOMP_FILTER_FLAG_LOG`
630
630
*`SECCOMP_FILTER_FLAG_SPEC_ALLOW`
631
631
632
+
***`listenerPath`***(string, OPTIONAL)* - specifies the path of UNIX domain socket over which the runtime will send the [container process state](#containerprocessstate) data structure when the `SCMP_ACT_NOTIFY` action is used.
633
+
This socket MUST use `AF_UNIX` domain and `SOCK_STREAM` type.
634
+
The runtime MUST send exactly one [container process state](#containerprocessstate) per connection.
635
+
The connection MUST NOT be reused and it MUST be closed after sending a seccomp state.
636
+
If sending to this socket fails, the runtime MUST [generate an error](runtime.md#errors).
637
+
If the `SCMP_ACT_NOTIFY` action is not used this value is ignored.
638
+
639
+
The runtime sends the following file descriptors using `SCM_RIGHTS` and set their names in the `fds` array of the [container process state](#containerprocessstate):
640
+
641
+
***`seccompFd`** (string, REQUIRED) is the seccomp file descriptor returned by the seccomp syscall.
642
+
643
+
***`listenerMetadata`***(string, OPTIONAL)* - specifies an opaque data to pass to the seccomp agent.
644
+
This string will be sent as the `metadata` field in the [container process state](#containerprocessstate).
645
+
This field MUST NOT be set if `listenerPath` is not set.
646
+
632
647
***`syscalls`***(array of objects, OPTIONAL)* - match a syscall in seccomp.
633
648
While this property is OPTIONAL, some values of `defaultAction` are not useful without `syscalls` entries.
634
649
For example, if `defaultAction` is `SCMP_ACT_KILL` and `syscalls` is empty or unset, the kernel will kill the container process on its first syscall.
@@ -637,7 +652,7 @@ The following parameters can be specified to set up seccomp:
637
652
***`names`***(array of strings, REQUIRED)* - the names of the syscalls.
638
653
`names` MUST contain at least one entry.
639
654
***`action`***(string, REQUIRED)* - the action for seccomp rules.
640
-
A valid list of constants as of libseccomp v2.4.0 is shown below.
655
+
A valid list of constants as of libseccomp v2.5.0 is shown below.
641
656
642
657
*`SCMP_ACT_KILL`
643
658
*`SCMP_ACT_KILL_PROCESS`
@@ -647,6 +662,7 @@ The following parameters can be specified to set up seccomp:
647
662
*`SCMP_ACT_TRACE`
648
663
*`SCMP_ACT_ALLOW`
649
664
*`SCMP_ACT_LOG`
665
+
*`SCMP_ACT_NOTIFY`
650
666
651
667
***`errnoRet`***(uint, OPTIONAL)* - the errno return code to use.
652
668
Some actions like `SCMP_ACT_ERRNO` and `SCMP_ACT_TRACE` allow to specify the errno code to return.
@@ -691,6 +707,45 @@ The following parameters can be specified to set up seccomp:
691
707
}
692
708
```
693
709
710
+
### <aname="containerprocessstate" />The Container Process State
711
+
712
+
The container process state is a data structure passed via a UNIX socket.
713
+
The container runtime MUST send the container process state over the UNIX socket as regular payload serialized in JSON and file descriptors MUST be sent using `SCM_RIGHTS`.
714
+
The container runtime MAY use several `sendmsg(2)` calls to send the aforementioned data.
715
+
If more than one `sendmsg(2)` is used, the file descriptors MUST be sent only in the first call.
716
+
717
+
The container process state includes the following properties:
718
+
719
+
***`ociVersion`** (string, REQUIRED) is version of the Open Container Initiative Runtime Specification with which the container process state complies.
720
+
***`fds`** (array, OPTIONAL) is a string array containing the names of the file descriptors passed.
721
+
The index of the name in this array corresponds to index of the file descriptors in the `SCM_RIGHTS` array.
722
+
***`pid`** (int, REQUIRED) is the container process ID, as seen by the runtime.
0 commit comments