Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/proc: remove memlock limit for ebpf trace backend #3353

Merged
merged 1 commit into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/proc/internal/ebpf/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/cilium/ebpf"
"github.com/cilium/ebpf/link"
"github.com/cilium/ebpf/ringbuf"
"github.com/cilium/ebpf/rlimit"
)

//lint:file-ignore U1000 some fields are used by the C program
Expand Down Expand Up @@ -109,6 +110,9 @@ func LoadEBPFTracingProgram(path string) (*EBPFContext, error) {
objs traceObjects
)

if err = rlimit.RemoveMemlock(); err != nil {
return nil, err
}
ctx.executable, err = link.OpenExecutable(path)
if err != nil {
return nil, err
Expand Down
113 changes: 113 additions & 0 deletions vendor/github.com/cilium/ebpf/rlimit/rlimit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ github.com/cilium/ebpf/internal/btf
github.com/cilium/ebpf/internal/unix
github.com/cilium/ebpf/link
github.com/cilium/ebpf/ringbuf
github.com/cilium/ebpf/rlimit
# github.com/cosiner/argv v0.1.0
## explicit
github.com/cosiner/argv
Expand Down Expand Up @@ -91,8 +92,6 @@ golang.org/x/tools/internal/gocommand
golang.org/x/tools/internal/packagesinternal
golang.org/x/tools/internal/typeparams
golang.org/x/tools/internal/typesinternal
# golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
## explicit
# gopkg.in/yaml.v2 v2.4.0
## explicit
gopkg.in/yaml.v2