Merge pull request #43987 from thaJeztah/seccomp_bpfcap
seccomp: allow "bpf", "perf_event_open", gated by CAP_BPF, CAP_PERFMON
This commit is contained in:
commit
1e97933876
2 changed files with 44 additions and 0 deletions
|
@ -790,6 +790,28 @@
|
|||
"CAP_SYSLOG"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"names": [
|
||||
"bpf"
|
||||
],
|
||||
"action": "SCMP_ACT_ALLOW",
|
||||
"includes": {
|
||||
"caps": [
|
||||
"CAP_BPF"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"names": [
|
||||
"perf_event_open"
|
||||
],
|
||||
"action": "SCMP_ACT_ALLOW",
|
||||
"includes": {
|
||||
"caps": [
|
||||
"CAP_PERFMON"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -777,6 +777,28 @@ func DefaultProfile() *Seccomp {
|
|||
Caps: []string{"CAP_SYSLOG"},
|
||||
},
|
||||
},
|
||||
{
|
||||
LinuxSyscall: specs.LinuxSyscall{
|
||||
Names: []string{
|
||||
"bpf",
|
||||
},
|
||||
Action: specs.ActAllow,
|
||||
},
|
||||
Includes: &Filter{
|
||||
Caps: []string{"CAP_BPF"},
|
||||
},
|
||||
},
|
||||
{
|
||||
LinuxSyscall: specs.LinuxSyscall{
|
||||
Names: []string{
|
||||
"perf_event_open",
|
||||
},
|
||||
Action: specs.ActAllow,
|
||||
},
|
||||
Includes: &Filter{
|
||||
Caps: []string{"CAP_PERFMON"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
errnoRet := uint(unix.EPERM)
|
||||
|
|
Loading…
Reference in a new issue