Skip to content

cgroup2: port over eBPF device controller from crun#2145

Merged
crosbymichael merged 1 commit into
opencontainers:masterfrom
AkihiroSuda:ebpf
Oct 31, 2019
Merged

cgroup2: port over eBPF device controller from crun#2145
crosbymichael merged 1 commit into
opencontainers:masterfrom
AkihiroSuda:ebpf

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda commented Oct 17, 2019

The implementation is based on https://github.com/containers/crun/blob/0.10.2/src/libcrun/ebpf.c

Although ebpf.c is originally licensed under LGPL-3.0-or-later, the author Giuseppe Scrivano agreed to relicense the file in Apache License 2.0: #2144 (comment)

See libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go for tested configurations.

Close #2144

@AkihiroSuda
Copy link
Copy Markdown
Member Author

AkihiroSuda commented Oct 17, 2019

CI failing for ARM (EDIT: passing now)

CGO_ENABLED=1 GOARCH=arm GOARM=6 CC=arm-linux-gnueabi-gcc go build -buildmode=pie  -ldflags "-X main.gitCommit="bf9519326d3dcc4a78f3cddbc54ac7a78a0aa948" -X main.version=1.0.0-rc9+dev " -tags "seccomp apparmor selinux ambient" -o runc-armel .
# github.com/opencontainers/runc/vendor/github.com/cilium/ebpf
vendor/github.com/cilium/ebpf/syscalls.go:285:17: constant 3405662737 overflows int32
Makefile:125: recipe for target 'localcross' failed

@AkihiroSuda
Copy link
Copy Markdown
Member Author

@giuseppe LGTY?

Comment thread libcontainer/cgroups/fs/devices_v2.go Outdated
Copy link
Copy Markdown
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crosbymichael
Copy link
Copy Markdown
Member

crosbymichael commented Oct 30, 2019

LGTM

Approved with PullApprove

The implementation is based on https://github.com/containers/crun/blob/0.10.2/src/libcrun/ebpf.c

Although ebpf.c is originally licensed under LGPL-3.0-or-later, the author
Giuseppe Scrivano agreed to relicense the file in Apache License 2.0:
opencontainers#2144 (comment)

See libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go for tested configurations.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda
Copy link
Copy Markdown
Member Author

rebased

@AkihiroSuda
Copy link
Copy Markdown
Member Author

@dqminh @hqhq PTAL? This is the blocker for supporting cgroup2.

@mrunalp
Copy link
Copy Markdown
Contributor

mrunalp commented Oct 31, 2019

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Copy Markdown
Member

crosbymichael commented Oct 31, 2019

LGTM

Approved with PullApprove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cgroup2: eBPF device controller

4 participants