From b309e96b11f221f9754d2842967ed24c0ae9a00b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 16 Jul 2021 15:33:33 +0200 Subject: [PATCH] seccomp: improve GoDoc for Seccomp fields Signed-off-by: Sebastiaan van Stijn --- profiles/seccomp/seccomp.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/profiles/seccomp/seccomp.go b/profiles/seccomp/seccomp.go index 4d12e9f6b7..d48d35a9a2 100644 --- a/profiles/seccomp/seccomp.go +++ b/profiles/seccomp/seccomp.go @@ -18,9 +18,19 @@ type Seccomp struct { // Architectures is kept to maintain backward compatibility with the old // seccomp profile. - Architectures []specs.Arch `json:"architectures,omitempty"` - ArchMap []Architecture `json:"archMap,omitempty"` - Syscalls []*Syscall `json:"syscalls"` + Architectures []specs.Arch `json:"architectures,omitempty"` + + // ArchMap contains a list of Architectures and Sub-architectures for the + // profile. When generating the profile, this list is expanded to a + // []specs.Arch, to propagate the Architectures field of the profile. + ArchMap []Architecture `json:"archMap,omitempty"` + + // Syscalls contains lists of syscall rules. Rules can define conditions + // for them to be included or excluded in the resulting profile (based on + // on kernel version, architecture, capabilities, etc.). These lists are + // expanded to an specs.Syscall When generating the profile, these lists + // are expanded to a []specs.LinuxSyscall. + Syscalls []*Syscall `json:"syscalls"` } // Architecture is used to represent a specific architecture