Skip to content

Commit

Permalink
adding support of CAP_BPF and CAP_PERFMON
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Wang <henwang@amazon.com>
  • Loading branch information
henry118 committed Aug 17, 2022
1 parent 0fd000f commit 4390751
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/seccomp/seccomp_default.go
Expand Up @@ -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{},
})
}
}

Expand Down

0 comments on commit 4390751

Please sign in to comment.