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

Enable bpf() syscall (and other BPF config options) #35

Open
robster7674 opened this issue Apr 4, 2022 · 4 comments
Open

Enable bpf() syscall (and other BPF config options) #35

robster7674 opened this issue Apr 4, 2022 · 4 comments

Comments

@robster7674
Copy link

While experimenting with Docker on PinePhone (spesmilo/electrum#5159) I hit an error on Docker, most likely the result of not having CONFIG_BPF_SYSCALL enabled on 5.16.16-1-MANJARO-ARM:

[manjaro@manjaro-arm appimage]$ zgrep BPF /proc/config.gz 
CONFIG_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
# BPF subsystem
# CONFIG_BPF_SYSCALL is not set
CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_DEFAULT_ON=y
# end of BPF subsystem
# CONFIG_NETFILTER_XT_MATCH_BPF is not set
# CONFIG_BPFILTER is not set
# CONFIG_TEST_BPF is not set

I suggest to enable BPF using the config listed on https://github.com/iovisor/bpftrace/blob/master/INSTALL.md#linux-kernel-requirements, perhaps with the addition of CONFIG_CGROUP_BPF=y to enable cgroups v2 support as well (https://www.kernel.org/doc/html/v4.18/admin-guide/cgroup-v2.html, https://www.kernel.org/doc/html/latest/userspace-api/ebpf/syscall.html).

@robster7674
Copy link
Author

Looking at the config for 5.16.16-1 on https://gitlab.manjaro.org/packages/core/linux516/-/blob/master/config#L3 this shows that CONFIG_BPF_SYSCALL is actually enabled. What was the reason for disabling it in Manjaro/PhoSh kernel 5.16.16-1?

@robster7674
Copy link
Author

From #11 (comment) it appears that not the Manjaro kernel I referred to is used, but the Megi kernel. If so, was disabling CONFIG_BPF_SYSCALL perhaps a workaround for the issue fixed in https://xff.cz/git/linux/commit/?id=330f4c53d3c2d8b11d86ec03a964b86dc81452f5?

cc: @philmmanjaro

@robster7674
Copy link
Author

Thanks @philmmanjaro . How would I go about and update my kernel to 5.17? Could I use https://xff.cz/kernels/5.17/pp.tar.gz? If yes, how? Sorry if asking n00b questions, I am new to Manjaro and PinePhone.

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

No branches or pull requests

2 participants