Skip to content

Commit 3ca5c6c

Browse files
author
zhouhao
committed
config-linux.md: fix seccomp
Signed-off-by: zhouhao <[email protected]>
1 parent 71afb41 commit 3ca5c6c

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
@@ -496,43 +496,70 @@ Seccomp provides application sandboxing mechanism in the Linux kernel.
496496
Seccomp configuration allows one to configure actions to take for matched syscalls and furthermore also allows matching on values passed as arguments to syscalls.
497497
For more information about Seccomp, see [Seccomp][seccomp] kernel documentation.
498498
The actions, architectures, and operators are strings that match the definitions in seccomp.h from [libseccomp][] and are translated to corresponding values.
499-
A valid list of constants as of libseccomp v2.3.2 is shown below.
500-
501-
Architecture Constants
502-
* `SCMP_ARCH_X86`
503-
* `SCMP_ARCH_X86_64`
504-
* `SCMP_ARCH_X32`
505-
* `SCMP_ARCH_ARM`
506-
* `SCMP_ARCH_AARCH64`
507-
* `SCMP_ARCH_MIPS`
508-
* `SCMP_ARCH_MIPS64`
509-
* `SCMP_ARCH_MIPS64N32`
510-
* `SCMP_ARCH_MIPSEL`
511-
* `SCMP_ARCH_MIPSEL64`
512-
* `SCMP_ARCH_MIPSEL64N32`
513-
* `SCMP_ARCH_PPC`
514-
* `SCMP_ARCH_PPC64`
515-
* `SCMP_ARCH_PPC64LE`
516-
* `SCMP_ARCH_S390`
517-
* `SCMP_ARCH_S390X`
518-
* `SCMP_ARCH_PARISC`
519-
* `SCMP_ARCH_PARISC64`
520-
521-
Action Constants:
522-
* `SCMP_ACT_KILL`
523-
* `SCMP_ACT_TRAP`
524-
* `SCMP_ACT_ERRNO`
525-
* `SCMP_ACT_TRACE`
526-
* `SCMP_ACT_ALLOW`
527-
528-
Operator Constants:
529-
* `SCMP_CMP_NE`
530-
* `SCMP_CMP_LT`
531-
* `SCMP_CMP_LE`
532-
* `SCMP_CMP_EQ`
533-
* `SCMP_CMP_GE`
534-
* `SCMP_CMP_GT`
535-
* `SCMP_CMP_MASKED_EQ`
499+
500+
**`seccomp`** (object, OPTIONAL)
501+
502+
The following parameters can be specified to setup seccomp:
503+
504+
* **`defaultAction`** *(string, REQUIRED)* - the default action for seccomp. Allowed values are the same as `syscalls[].action`.
505+
506+
* **`architectures`** *(array of strings, OPTIONAL)* - the architecture used for system calls.
507+
A valid list of constants as of libseccomp v2.3.2 is shown below.
508+
509+
* `SCMP_ARCH_X86`
510+
* `SCMP_ARCH_X86_64`
511+
* `SCMP_ARCH_X32`
512+
* `SCMP_ARCH_ARM`
513+
* `SCMP_ARCH_AARCH64`
514+
* `SCMP_ARCH_MIPS`
515+
* `SCMP_ARCH_MIPS64`
516+
* `SCMP_ARCH_MIPS64N32`
517+
* `SCMP_ARCH_MIPSEL`
518+
* `SCMP_ARCH_MIPSEL64`
519+
* `SCMP_ARCH_MIPSEL64N32`
520+
* `SCMP_ARCH_PPC`
521+
* `SCMP_ARCH_PPC64`
522+
* `SCMP_ARCH_PPC64LE`
523+
* `SCMP_ARCH_S390`
524+
* `SCMP_ARCH_S390X`
525+
* `SCMP_ARCH_PARISC`
526+
* `SCMP_ARCH_PARISC64`
527+
528+
* **`syscalls`** *(array of objects, REQUIRED)* - match a syscall in seccomp.
529+
530+
Each entry has the following structure:
531+
532+
* **`names`** *(array of strings, REQUIRED)* - the names of the syscalls.
533+
534+
* **`action`** *(string, REQUIRED)* - the action for seccomp rules.
535+
A valid list of constants as of libseccomp v2.3.2 is shown below.
536+
537+
* `SCMP_ACT_KILL`
538+
* `SCMP_ACT_TRAP`
539+
* `SCMP_ACT_ERRNO`
540+
* `SCMP_ACT_TRACE`
541+
* `SCMP_ACT_ALLOW`
542+
543+
* **`args`** *(array of objects, OPTIONAL)* - the specific syscall in seccomp.
544+
545+
Each entry has the following structure:
546+
547+
* **`index`** *(uint, REQUIRED)* - the index for syscall arguments in seccomp.
548+
549+
* **`value`** *(uint64, REQUIRED)* - the value for syscall arguments in seccomp.
550+
551+
* **`valueTwo`** *(uint64, REQUIRED)* - the value for syscall arguments in seccomp.
552+
553+
* **`op`** *(string, REQUIRED)* - the operator for syscall arguments in seccomp.
554+
A valid list of constants as of libseccomp v2.3.2 is shown below.
555+
556+
* `SCMP_CMP_NE`
557+
* `SCMP_CMP_LT`
558+
* `SCMP_CMP_LE`
559+
* `SCMP_CMP_EQ`
560+
* `SCMP_CMP_GE`
561+
* `SCMP_CMP_GT`
562+
* `SCMP_CMP_MASKED_EQ`
536563

537564
###### Example
538565

0 commit comments

Comments
 (0)