From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Yonghong Song <yhs@fb.com>
Cc: bpf <bpf@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
Alexei Starovoitov <ast@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH bpf] tools/bpftool: move set_max_rlimit() before __bpf_object__open_xattr()
Date: Thu, 16 May 2019 11:46:33 -0700 [thread overview]
Message-ID: <CAADnVQL9VhTDhD-9a_2cZzHXLXW=pa9uQV4XgtDYZ-nTdLWt+A@mail.gmail.com> (raw)
In-Reply-To: <20190516171731.2320976-1-yhs@fb.com>
On Thu, May 16, 2019 at 11:31 AM Yonghong Song <yhs@fb.com> wrote:
>
> For a host which has a lower rlimit for max locked memory (e.g., 64KB),
> the following error occurs in one of our production systems:
> # /usr/sbin/bpftool prog load /paragon/pods/52877437/home/mark.o \
> /sys/fs/bpf/paragon_mark_21 type cgroup/skb \
> map idx 0 pinned /sys/fs/bpf/paragon_map_21
> libbpf: Error in bpf_object__probe_name():Operation not permitted(1).
> Couldn't load basic 'r0 = 0' BPF program.
> Error: failed to open object file
>
> The reason is due to low locked memory during bpf_object__probe_name()
> which probes whether program name is supported in kernel or not
> during __bpf_object__open_xattr().
>
> bpftool program load already tries to relax mlock rlimit before
> bpf_object__load(). Let us move set_max_rlimit() before
> __bpf_object__open_xattr(), which fixed the issue here.
>
> Fixes: 47eff61777c7 ("bpf, libbpf: introduce bpf_object__probe_caps to test BPF capabilities")
> Signed-off-by: Yonghong Song <yhs@fb.com>
Applied. Thanks
prev parent reply other threads:[~2019-05-16 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-16 17:17 [PATCH bpf] tools/bpftool: move set_max_rlimit() before __bpf_object__open_xattr() Yonghong Song
2019-05-16 18:46 ` Alexei Starovoitov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAADnVQL9VhTDhD-9a_2cZzHXLXW=pa9uQV4XgtDYZ-nTdLWt+A@mail.gmail.com' \
--to=alexei.starovoitov@gmail.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).