Skip to content

Commit 8cfc407

Browse files
authored
specs-go: sync SCMP_ARCH_* constants with libseccomp main (#1229)
The following constants are defined in the main branch of libseccomp, but not included in its latest release (v2.5) yet: * SCMP_ARCH_LOONGARCH64 (seccomp/libseccomp@6966ec7) * SCMP_ARCH_M68K (seccomp/libseccomp@dd5c9c2) * SCMP_ARCH_SH (seccomp/libseccomp@c12945d) * SCMP_ARCH_SHEB (seccomp/libseccomp@c12945d) These constant names are unlikely to change before v2.6 GA, so we can safely refer to them in specs-go. Signed-off-by: Akihiro Suda <[email protected]>
1 parent 9505701 commit 8cfc407

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

config-linux.md

+11
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,17 @@ The following parameters can be specified to set up seccomp:
743743
* `SCMP_ARCH_PARISC64`
744744
* `SCMP_ARCH_RISCV64`
745745

746+
<!--
747+
The following constants are defined in the main branch of libseccomp,
748+
but not included in its latest release (v2.5) yet:
749+
https://github.com/seccomp/libseccomp/commits/main/include/seccomp.h.in
750+
751+
* SCMP_ARCH_LOONGARCH64
752+
* SCMP_ARCH_M68K
753+
* SCMP_ARCH_SH
754+
* SCMP_ARCH_SHEB
755+
-->
756+
746757
* **`flags`** *(array of strings, OPTIONAL)* - list of flags to use with seccomp(2).
747758

748759
A valid list of constants is shown below.

schema/defs-linux.json

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"SCMP_ARCH_X32",
3636
"SCMP_ARCH_ARM",
3737
"SCMP_ARCH_AARCH64",
38+
"SCMP_ARCH_LOONGARCH64",
39+
"SCMP_ARCH_M68K",
3840
"SCMP_ARCH_MIPS",
3941
"SCMP_ARCH_MIPS64",
4042
"SCMP_ARCH_MIPS64N32",
@@ -46,6 +48,8 @@
4648
"SCMP_ARCH_PPC64LE",
4749
"SCMP_ARCH_S390",
4850
"SCMP_ARCH_S390X",
51+
"SCMP_ARCH_SH",
52+
"SCMP_ARCH_SHEB",
4953
"SCMP_ARCH_PARISC",
5054
"SCMP_ARCH_PARISC64",
5155
"SCMP_ARCH_RISCV64"

specs-go/config.go

+12
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,18 @@ const (
761761
ArchRISCV64 Arch = "SCMP_ARCH_RISCV64"
762762
)
763763

764+
// The following constants are defined in the main branch of libseccomp,
765+
// but not included in its latest release (v2.5) yet.
766+
// https://github.com/seccomp/libseccomp/commits/main/include/seccomp.h.in
767+
//
768+
// Will be included in libseccomp v2.6.
769+
const (
770+
ArchLOONGARCH64 Arch = "SCMP_ARCH_LOONGARCH64"
771+
ArchM68K Arch = "SCMP_ARCH_M68K"
772+
ArchSH Arch = "SCMP_ARCH_SH"
773+
ArchSHEB Arch = "SCMP_ARCH_SHEB"
774+
)
775+
764776
// LinuxSeccompAction taken upon Seccomp rule match
765777
type LinuxSeccompAction string
766778

0 commit comments

Comments
 (0)