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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 8 Nov 2019 16:44:24 -0800
From:   Andrii Nakryiko <>
To:     Toke Høiland-Jørgensen <>
Cc:     Daniel Borkmann <>,
        Alexei Starovoitov <>,
        Martin KaFai Lau <>,
        Song Liu <>, Yonghong Song <>,
        Jesper Dangaard Brouer <>,
        David Miller <>,
        Networking <>, bpf <>
Subject: Re: [PATCH bpf-next v3 3/6] libbpf: Propagate EPERM to caller on
 program load

On Fri, Nov 8, 2019 at 4:01 PM Toke Høiland-Jørgensen <> wrote:
> From: Toke Høiland-Jørgensen <>
> When loading an eBPF program, libbpf overrides the return code for EPERM
> errors instead of returning it to the caller. This makes it hard to figure
> out what went wrong on load.
> In particular, EPERM is returned when the system rlimit is too low to lock
> the memory required for the BPF program. Previously, this was somewhat
> obscured because the rlimit error would be hit on map creation (which does
> return it correctly). However, since maps can now be reused, object load
> can proceed all the way to loading programs without hitting the error;
> propagating it even in this case makes it possible for the caller to react
> appropriately (and, e.g., attempt to raise the rlimit before retrying).
> Acked-by: David S. Miller <>
> Acked-by: Song Liu <>
> Signed-off-by: Toke Høiland-Jørgensen <>
> ---

Acked-by: Andrii Nakryiko <>

>  tools/lib/bpf/libbpf.c |   27 +++++++++++----------------
>  1 file changed, 11 insertions(+), 16 deletions(-)


Powered by blists - more mailing lists