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

Unable to load bpf program that define BPF_MAP_TYPE_ARRAY #303

Open
ChrsMark opened this issue Sep 27, 2021 · 1 comment
Open

Unable to load bpf program that define BPF_MAP_TYPE_ARRAY #303

ChrsMark opened this issue Sep 27, 2021 · 1 comment

Comments

@ChrsMark
Copy link

Hi!

I'm having issues while trying to load BPF program that defines a BPF_MAP_TYPE_ARRAY. I'm getting the following error when trying to call

func (b *Module) Load(parameters map[string]SectionParams) error {
:

error while loading map "maps/count_map": operation not permitted

I'm running on Ubuntu machine on GCP:

cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I can provide more info if needed but wondering if this is something obvious that I'm missing on my system.

Thanks!

@ChrsMark
Copy link
Author

Update:

It seems that it fails at

ret = syscall(__NR_bpf, BPF_MAP_CREATE, &attr, sizeof(attr));
and even setting the limit to unlimited with ulimit -a unlimited it doesn't fix the issue. Running with sudo doesn't help too.

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

1 participant