Re: [PATCH bpf-next 5/8] bpf: Add link-based BPF program attachment to network namespace

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

 



On Thu, May 28, 2020 at 11:09:20AM -0700, Andrii Nakryiko wrote:
> > >> +       net = rcu_dereference(net_link->net);
> > >> +       if (!net || !check_net(net)) {
> > >> +               /* Link auto-detached or netns dying */
> > >> +               ret = -ENOLINK;
> > >
> > > This is an interesting error code. If we are going to adopt this, we
> > > should change it for similar cgroup link situation as well.
> >
> > Credit goes to Lorenz for suggesting a different error code than EINVAL
> > for this situation so that user-space has a way to distinguish.
> >
> > I'm happy to patch cgroup BPF link, if you support this change.
> 
> Yeah, I guess let's do that. I like "link was severed" message for
> that errno :) But for me it's way more about consistency, than any
> specific error code.

I like ENOLINK idea as well.
Let's fix it there and patch older kernels via separate patch.

Overall the set looks great. Looking forward to v2.



[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