Skip to content

Commit 7733617

Browse files
Kenta TadaManaSugi
authored and
Kenta Tada
committed
Add the specification of seccomp userspace notification
Co-authored-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com> Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
1 parent e6143ca commit 7733617

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

config-linux.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,9 @@ The following parameters can be specified to set up seccomp:
624624
* `SECCOMP_FILTER_FLAG_TSYNC`
625625
* `SECCOMP_FILTER_FLAG_LOG`
626626
* `SECCOMP_FILTER_FLAG_SPEC_ALLOW`
627+
* `SECCOMP_FILTER_FLAG_NEW_LISTENER`
628+
629+
* **`listenerPath`** *(string, OPTIONAL)* - specifies the path of UNIX domain socket which the runtime will pass the file descriptor of seccomp notification using SCM_RIGHT to.
627630

628631
* **`syscalls`** *(array of objects, OPTIONAL)* - match a syscall in seccomp.
629632
While this property is OPTIONAL, some values of `defaultAction` are not useful without `syscalls` entries.
@@ -633,7 +636,7 @@ The following parameters can be specified to set up seccomp:
633636
* **`names`** *(array of strings, REQUIRED)* - the names of the syscalls.
634637
`names` MUST contain at least one entry.
635638
* **`action`** *(string, REQUIRED)* - the action for seccomp rules.
636-
A valid list of constants as of libseccomp v2.4.0 is shown below.
639+
A valid list of constants is shown below.
637640

638641
* `SCMP_ACT_KILL`
639642
* `SCMP_ACT_KILL_PROCESS`
@@ -642,6 +645,7 @@ The following parameters can be specified to set up seccomp:
642645
* `SCMP_ACT_TRACE`
643646
* `SCMP_ACT_ALLOW`
644647
* `SCMP_ACT_LOG`
648+
* `SCMP_ACT_NOTIFY`
645649

646650
* **`errnoRet`** *(uint, OPTIONAL)* - the errno return code to use.
647651
Some actions like `SCMP_ACT_ERRNO` and `SCMP_ACT_TRACE` allow to specify the errno

schema/config-linux.json

+3
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@
209209
"$ref": "defs-linux.json#/definitions/SeccompFlag"
210210
}
211211
},
212+
"listenerPath": {
213+
"type": "string"
214+
},
212215
"architectures": {
213216
"type": "array",
214217
"items": {

schema/defs-linux.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,17 @@
6060
"SCMP_ACT_ERRNO",
6161
"SCMP_ACT_TRACE",
6262
"SCMP_ACT_ALLOW",
63-
"SCMP_ACT_LOG"
63+
"SCMP_ACT_LOG",
64+
"SCMP_ACT_NOTIFY"
6465
]
6566
},
6667
"SeccompFlag": {
6768
"type": "string",
6869
"enum": [
6970
"SECCOMP_FILTER_FLAG_TSYNC",
7071
"SECCOMP_FILTER_FLAG_LOG",
71-
"SECCOMP_FILTER_FLAG_SPEC_ALLOW"
72+
"SECCOMP_FILTER_FLAG_SPEC_ALLOW",
73+
"SECCOMP_FILTER_FLAG_NEW_LISTENER"
7274
]
7375
},
7476
"SeccompOperators": {

specs-go/config.go

+2
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ type LinuxSeccomp struct {
601601
DefaultAction LinuxSeccompAction `json:"defaultAction"`
602602
Architectures []Arch `json:"architectures,omitempty"`
603603
Flags []LinuxSeccompFlag `json:"flags,omitempty"`
604+
ListenerPath string `json:"listenerPath,omitempty"`
604605
Syscalls []LinuxSyscall `json:"syscalls,omitempty"`
605606
}
606607

@@ -646,6 +647,7 @@ const (
646647
ActTrace LinuxSeccompAction = "SCMP_ACT_TRACE"
647648
ActAllow LinuxSeccompAction = "SCMP_ACT_ALLOW"
648649
ActLog LinuxSeccompAction = "SCMP_ACT_LOG"
650+
ActNotify LinuxSeccompAction = "SCMP_ACT_NOTIFY"
649651
)
650652

651653
// LinuxSeccompOperator used to match syscall arguments in Seccomp

0 commit comments

Comments
 (0)