[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOftzPjoAadwrYzhMY_P36D+ZpKAzYBAFth=S3LyGrqKGy9e2g@mail.gmail.com>
Date: Mon, 19 Nov 2018 10:36:26 -0800
From: Joe Stringer <joe@...d.net.nz>
To: David Ahern <dsahern@...il.com>
Cc: Joe Stringer <joe@...d.net.nz>, netdev <netdev@...r.kernel.org>,
daniel@...earbox.net
Subject: Re: netns_id in bpf_sk_lookup_{tcp,udp}
Hi David, thanks for pointing this out.
This is more of an oversight through iterations, the runtime lookup
will fail to find a socket if the netns value is greater than the
range of a uint32 so I think it would actually make more sense to drop
the parameter size to u32 rather than u64 so that this would be
validated at load time rather than silently returning NULL because of
a bad parameter.
I'll send a patch to bpf tree.
Cheers,
Joe
On Sun, 18 Nov 2018 at 19:27, David Ahern <dsahern@...il.com> wrote:
>
> Hi Joe:
>
> The netns_id to the bpf_sk_lookup_{tcp,udp} functions in
> net/core/filter.c is a u64, yet the APIs in include/uapi/linux/bpf.h
> shows a u32. Is that intentional or an oversight through the iterations?
>
> David
Powered by blists - more mailing lists