lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 16 May 2019 11:46:33 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Yonghong Song <yhs@...com>
Cc:     bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH bpf] tools/bpftool: move set_max_rlimit() before __bpf_object__open_xattr()

On Thu, May 16, 2019 at 11:31 AM Yonghong Song <yhs@...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@...com>

Applied. Thanks

Powered by blists - more mailing lists