summaryrefslogtreecommitdiffstats
path: root/tools/spi
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2019-05-16 19:17:31 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-05-16 20:44:50 +0200
commitac4e0e055fee5751c78bba1fc9ce508a6874d916 (patch)
tree5e1d1a8e3bc75cb07992a924142f457fea9aa861 /tools/spi
parentselftests/bpf: add test_sysctl and map_tests/tests.h to .gitignore (diff)
downloadlinux-ac4e0e055fee5751c78bba1fc9ce508a6874d916.tar.xz
linux-ac4e0e055fee5751c78bba1fc9ce508a6874d916.zip
tools/bpftool: move set_max_rlimit() before __bpf_object__open_xattr()
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> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/spi')
0 files changed, 0 insertions, 0 deletions