Skip to content

Commit 3adac26

Browse files
Merge pull request #706 from q384566678/fix-seecomp
config-linux.md: fix seccomp
2 parents e659613 + 3ca5c6c commit 3adac26

File tree

1 file changed

+64
-37
lines changed

1 file changed

+64
-37
lines changed

config-linux.md

Lines changed: 64 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -581,43 +581,70 @@ Seccomp provides application sandboxing mechanism in the Linux kernel.
581581
Seccomp configuration allows one to configure actions to take for matched syscalls and furthermore also allows matching on values passed as arguments to syscalls.
582582
For more information about Seccomp, see [Seccomp][seccomp] kernel documentation.
583583
The actions, architectures, and operators are strings that match the definitions in seccomp.h from [libseccomp][] and are translated to corresponding values.
584-
A valid list of constants as of libseccomp v2.3.2 is shown below.
585-
586-
Architecture Constants
587-
* `SCMP_ARCH_X86`
588-
* `SCMP_ARCH_X86_64`
589-
* `SCMP_ARCH_X32`
590-
* `SCMP_ARCH_ARM`
591-
* `SCMP_ARCH_AARCH64`
592-
* `SCMP_ARCH_MIPS`
593-
* `SCMP_ARCH_MIPS64`
594-
* `SCMP_ARCH_MIPS64N32`
595-
* `SCMP_ARCH_MIPSEL`
596-
* `SCMP_ARCH_MIPSEL64`
597-
* `SCMP_ARCH_MIPSEL64N32`
598-
* `SCMP_ARCH_PPC`
599-
* `SCMP_ARCH_PPC64`
600-
* `SCMP_ARCH_PPC64LE`
601-
* `SCMP_ARCH_S390`
602-
* `SCMP_ARCH_S390X`
603-
* `SCMP_ARCH_PARISC`
604-
* `SCMP_ARCH_PARISC64`
605-
606-
Action Constants:
607-
* `SCMP_ACT_KILL`
608-
* `SCMP_ACT_TRAP`
609-
* `SCMP_ACT_ERRNO`
610-
* `SCMP_ACT_TRACE`
611-
* `SCMP_ACT_ALLOW`
612-
613-
Operator Constants:
614-
* `SCMP_CMP_NE`
615-
* `SCMP_CMP_LT`
616-
* `SCMP_CMP_LE`
617-
* `SCMP_CMP_EQ`
618-
* `SCMP_CMP_GE`
619-
* `SCMP_CMP_GT`
620-
* `SCMP_CMP_MASKED_EQ`
584+
585+
**`seccomp`** (object, OPTIONAL)
586+
587+
The following parameters can be specified to setup seccomp:
588+
589+
* **`defaultAction`** *(string, REQUIRED)* - the default action for seccomp. Allowed values are the same as `syscalls[].action`.
590+
591+
* **`architectures`** *(array of strings, OPTIONAL)* - the architecture used for system calls.
592+
A valid list of constants as of libseccomp v2.3.2 is shown below.
593+
594+
* `SCMP_ARCH_X86`
595+
* `SCMP_ARCH_X86_64`
596+
* `SCMP_ARCH_X32`
597+
* `SCMP_ARCH_ARM`
598+
* `SCMP_ARCH_AARCH64`
599+
* `SCMP_ARCH_MIPS`
600+
* `SCMP_ARCH_MIPS64`
601+
* `SCMP_ARCH_MIPS64N32`
602+
* `SCMP_ARCH_MIPSEL`
603+
* `SCMP_ARCH_MIPSEL64`
604+
* `SCMP_ARCH_MIPSEL64N32`
605+
* `SCMP_ARCH_PPC`
606+
* `SCMP_ARCH_PPC64`
607+
* `SCMP_ARCH_PPC64LE`
608+
* `SCMP_ARCH_S390`
609+
* `SCMP_ARCH_S390X`
610+
* `SCMP_ARCH_PARISC`
611+
* `SCMP_ARCH_PARISC64`
612+
613+
* **`syscalls`** *(array of objects, REQUIRED)* - match a syscall in seccomp.
614+
615+
Each entry has the following structure:
616+
617+
* **`names`** *(array of strings, REQUIRED)* - the names of the syscalls.
618+
619+
* **`action`** *(string, REQUIRED)* - the action for seccomp rules.
620+
A valid list of constants as of libseccomp v2.3.2 is shown below.
621+
622+
* `SCMP_ACT_KILL`
623+
* `SCMP_ACT_TRAP`
624+
* `SCMP_ACT_ERRNO`
625+
* `SCMP_ACT_TRACE`
626+
* `SCMP_ACT_ALLOW`
627+
628+
* **`args`** *(array of objects, OPTIONAL)* - the specific syscall in seccomp.
629+
630+
Each entry has the following structure:
631+
632+
* **`index`** *(uint, REQUIRED)* - the index for syscall arguments in seccomp.
633+
634+
* **`value`** *(uint64, REQUIRED)* - the value for syscall arguments in seccomp.
635+
636+
* **`valueTwo`** *(uint64, REQUIRED)* - the value for syscall arguments in seccomp.
637+
638+
* **`op`** *(string, REQUIRED)* - the operator for syscall arguments in seccomp.
639+
A valid list of constants as of libseccomp v2.3.2 is shown below.
640+
641+
* `SCMP_CMP_NE`
642+
* `SCMP_CMP_LT`
643+
* `SCMP_CMP_LE`
644+
* `SCMP_CMP_EQ`
645+
* `SCMP_CMP_GE`
646+
* `SCMP_CMP_GT`
647+
* `SCMP_CMP_MASKED_EQ`
621648

622649
###### Example
623650

0 commit comments

Comments
 (0)