Re: [PATCH v1 bpf 1/2] bpf: Allow bpf_int_jit_compile() to set errno.

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

 



From: Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
Date: Tue, 15 Apr 2025 16:10:42 -0700
> On Mon, Apr 14, 2025 at 2:22 PM Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> wrote:
> >
> > There are some failure paths in bpf_int_jit_compile() that are not
> > worth triggering a warning in __bpf_prog_ret0_warn().
> >
> > For example, if we fail to allocate memory in bpf_int_jit_compile(),
> > we should propagate -ENOMEM to userspace instead of attaching
> > __bpf_prog_ret0_warn().
> >
> > Let's pass &err to bpf_int_jit_compile() to propagate errno.
> 
> Is there any reason we are not just returning ERR_PTR() instead of the
> approach in this patch? That seems more canonical within BPF
> subsystem, if we need to return error for pointer-returning functions?


[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