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 <[email protected]>
(cherry picked from commit 4390751)
Signed-off-by: Swagat Bora <[email protected]>
  • Loading branch information
henry118 authored and swagatbora90 committed Oct 22, 2022
1 parent 8b9c35a commit 346412f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/seccomp/seccomp_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,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 346412f

Please sign in to comment.