Re: [PATCH bpf-next 3/6] libbpf: Propagate EPERM to caller on program load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Nov 7, 2019, at 8:52 AM, Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote:
> 
> From: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
> 
> 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, sine maps can now be reused, object load can
				^^ since
> 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).
> 
> Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux