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
The `sendSeccompFd` hooks MUST only be called if the seccomp policy contains `SCMP_ACT_NOTIFY`.
463
+
The `sendSeccompFd` hooks MUST only be called if the seccomp policy contains `SCMP_ACT_NOTIFY` actions.
464
464
465
465
The `sendSeccompFd` hooks MUST be called after the [`start`](runtime.md#start) operation is called and after the seccomp policy is installed but [before the user-specified program command is executed](runtime.md#lifecycle).
466
466
The `sendSeccompFd` hooks MAY additionally be called while the container is in the [`running` state](runtime.md#runtimeState), for example during an `exec` operation.
@@ -475,31 +475,23 @@ The seccomp state is a data structure passed via stdin to the SendSeccompFd hook
475
475
It includes the following properties:
476
476
477
477
***`ociVersion`** (string, REQUIRED) is version of the Open Container Initiative Runtime Specification with which the seccomp state complies.
478
-
***`phase`** (string, REQUIRED) is the phase at which the seccomp file descriptor is created.
479
-
The value MAY be one of:
480
-
481
-
*`start`: the seccomp filter is created following the [`start`](runtime.md#start) command
482
-
*`exec`: the seccomp filter is created following an `exec` command
483
-
484
-
Additional values MAY be defined by the runtime, however, they MUST be used to represent new values not defined above.
485
-
***`seccompFd`** (int, REQUIRED) is the file descriptor for Seccomp User Notification passed via process inheritance to the SendSeccompFd hooks.
486
-
***`pid`** (int, REQUIRED) is the process ID on which the seccomp filter is applied. In the `start` phase, this is the same as `state.pid`. In the `exec` phase, this is a different pid than `state.pid`.
487
-
***`pidFd`** (int, OPTIONAL) is a pidfd for the process on which the seccomp filter is applied. This file descriptor is also passed via process inheritance to the SendSeccompFd hooks.
478
+
***`seccompFd`** (int, REQUIRED) is the file descriptor for Seccomp User Notification passed via process inheritance to the SendSeccompFd hooks. The value MUST NOT be zero: zero is reserved for stdin.
479
+
***`pid`** (int, REQUIRED) is the process ID on which the seccomp filter is applied.
480
+
***`pidFd`** (int, OPTIONAL) is a pid file descriptor for the process on which the seccomp filter is applied. This file descriptor is also passed via process inheritance to the SendSeccompFd hooks. As the field is optional, the value MAY be zero, meaning `pidFd` is not passed to the hook. If passed, the file descriptor MUST NOT be zero: zero is reserved for stdin.
488
481
***`state`** (map, REQUIRED) is the [state](runtime.md#state) of the container.
489
482
490
483
When serialized in JSON, the format MUST adhere to the following pattern:
491
484
492
485
```json
493
486
{
494
487
"ociVersion": "0.2.0",
495
-
"phase": "start",
496
488
"seccompFd": 3,
497
489
"pid": 4422,
498
490
"pidFd": 4,
499
491
"state": {
500
492
"ociVersion": "0.2.0",
501
493
"id": "oci-container1",
502
-
"status": "running",
494
+
"status": "creating",
503
495
"pid": 4422,
504
496
"bundle": "/containers/redis",
505
497
"annotations": {
@@ -509,6 +501,10 @@ When serialized in JSON, the format MUST adhere to the following pattern:
509
501
}
510
502
```
511
503
504
+
Note that if `state.status` is `creating`, the seccomp filter is created following the [`start`](runtime.md#start) command and `.pid` has the same value as `.state.pid`.
505
+
And if `state.status` is `running`, the seccomp filter is created following an `exec` command and `.pid` has a different value than `.state.pid`.
The `startContainer` hooks MUST be called [before the user-specified process is executed](runtime.md#lifecycle) as part of the [`start`](runtime.md#start) operation.
0 commit comments