Merge pull request #4492 from thaJeztah/seccomp_updates

seccomp: sync some changes with Docker/Moby's profile
This commit is contained in:
Michael Crosby 2020-08-25 11:34:34 -04:00 committed by GitHub
commit 40ce36fd27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
"accept", "accept",
"accept4", "accept4",
"access", "access",
"adjtimex",
"alarm", "alarm",
"bind", "bind",
"brk", "brk",
@ -191,6 +192,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
"lstat", "lstat",
"lstat64", "lstat64",
"madvise", "madvise",
"membarrier",
"memfd_create", "memfd_create",
"mincore", "mincore",
"mkdir", "mkdir",
@ -235,11 +237,13 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
"prctl", "prctl",
"pread64", "pread64",
"preadv", "preadv",
"preadv2",
"prlimit64", "prlimit64",
"pselect6", "pselect6",
"pselect6_time64", "pselect6_time64",
"pwrite64", "pwrite64",
"pwritev", "pwritev",
"pwritev2",
"read", "read",
"readahead", "readahead",
"readlink", "readlink",
@ -408,6 +412,28 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
}, },
}, },
}, },
{
Names: []string{"personality"},
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{
{
Index: 0,
Value: 0x20000,
Op: specs.OpEqualTo,
},
},
},
{
Names: []string{"personality"},
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{
{
Index: 0,
Value: 0x20008,
Op: specs.OpEqualTo,
},
},
},
{ {
Names: []string{"personality"}, Names: []string{"personality"},
Action: specs.ActAllow, Action: specs.ActAllow,
@ -429,11 +455,20 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
// include by arch // include by arch
switch runtime.GOARCH { switch runtime.GOARCH {
case "ppc64le":
s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{
Names: []string{
"sync_file_range2",
},
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{},
})
case "arm", "arm64": case "arm", "arm64":
s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{ s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{
Names: []string{ Names: []string{
"arm_fadvise64_64", "arm_fadvise64_64",
"arm_sync_file_range", "arm_sync_file_range",
"sync_file_range2",
"breakpoint", "breakpoint",
"cacheflush", "cacheflush",
"set_tls", "set_tls",
@ -490,6 +525,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
"mount", "mount",
"name_to_handle_at", "name_to_handle_at",
"perf_event_open", "perf_event_open",
"quotactl",
"setdomainname", "setdomainname",
"sethostname", "sethostname",
"setns", "setns",
@ -553,7 +589,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
Names: []string{ Names: []string{
"settimeofday", "settimeofday",
"stime", "stime",
"adjtimex", "clock_settime",
}, },
Action: specs.ActAllow, Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{}, Args: []specs.LinuxSeccompArg{},