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

Updated RLIMIT_MEMLOCK to account for pushing RLIMIT to RLIM_INFINITY #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions kernel/Documentation/bpf/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ programs. With a primary focus on programs under kernels samples/bpf.
Memory ulimits
==============

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 eBPF maps uses locked memory. A typical Ubuntu system will set RLIMIT to 64k `uname -l`.

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

.. _setrlimit(2): http://man7.org/linux/man-pages/man2/setrlimit.2.html
Expand Down