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

cgroups/ebpf: switch to new cilium/ebpf API #2699

Closed
kolyshkin opened this issue Dec 3, 2020 · 1 comment · Fixed by #2903
Closed

cgroups/ebpf: switch to new cilium/ebpf API #2699

kolyshkin opened this issue Dec 3, 2020 · 1 comment · Fixed by #2903
Labels

Comments

@kolyshkin
Copy link
Contributor

kolyshkin commented Dec 3, 2020

cilium/ebpf's prog.{Attach,Detach} API is now deprecated in favor of new link package (see cilium/ebpf@5727d65 and cilium/ebpf#110).

runc need to adopt.

libcontainer/cgroups/ebpf/ebpf.go:35:12: SA1019: prog.Attach is deprecated: use link.RawAttachProgram instead.  (staticcheck)
	if err := prog.Attach(dirFD, ebpf.AttachCGroupDevice, unix.BPF_F_ALLOW_MULTI); err != nil {
	          ^
libcontainer/cgroups/ebpf/ebpf.go:39:13: SA1019: prog.Detach is deprecated: use link.RawDetachProgram instead.  (staticcheck)
		if err := prog.Detach(dirFD, ebpf.AttachCGroupDevice, unix.BPF_F_ALLOW_MULTI); err != nil {
		          ^

I don't know much about these matters; @cyphar mind to take a look?

@thaJeztah
Copy link
Member

missed there was a tracking issue for this; I opened #2903, which also revealed a potential bug in the closer (pls double-check that one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants