Merge pull request #7301 from henry118/bpfcap

Adding support of CAP_BPF and CAP_PERFMON
This commit is contained in:
Fu Wei 2022-08-18 18:36:38 +08:00 committed by GitHub
commit 7c43483601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -671,6 +671,18 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{},
})
case "CAP_BPF":
s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{
Names: []string{"bpf"},
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{},
})
case "CAP_PERFMON":
s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{
Names: []string{"perf_event_open"},
Action: specs.ActAllow,
Args: []specs.LinuxSeccompArg{},
})
}
}