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

ebpf_create_map() failed: Operation not permitted #45

Open
ValentinoUberti opened this issue Mar 5, 2021 · 3 comments
Open

ebpf_create_map() failed: Operation not permitted #45

ValentinoUberti opened this issue Mar 5, 2021 · 3 comments

Comments

@ValentinoUberti
Copy link

Hi, I can not run any examples due to this error (I'm using Fedora 33):

$ uname -r
5.10.19-200.fc33.x86_64

$ pwd
goebpf/examples/xdp/basic_firewall

$ sudo ulimit
unlimited

$ clang --version
clang version 11.0.0 (Fedora 11.0.0-2.fc33)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ sudo ./main -iface enp7s0u2u1u2 -drop 8.8.8.8
LoadElf() failed: loadAndCreateMaps() failed: map.Create() failed: ebpf_create_map() failed: Operation not permitted

@caoshitong369
Copy link

hi bro, i have the same problem, how did you solve it

@botieking98
Copy link

em, I also have the same problem.

@zaoying
Copy link

zaoying commented Jun 11, 2023

The eBPF maps uses locked memory, which is default very low. Your program likely need to increase resource limit RLIMIT_MEMLOCK see system call setrlimit(2).

The bpf_create_map call will return errno EPERM (Operation not permitted) when the RLIMIT_MEMLOCK memory size limit is exceeded.

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

4 participants