lists.openwall.net   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  linux-hardening  linux-cve-announce  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:   Thu, 21 Oct 2021 12:07:52 -0700
From:   John Fastabend <john.fastabend@...il.com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Mark Pashmfouroush <markpash@...udflare.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Shuah Khan <shuah@...nel.org>,
        Florent Revest <revest@...omium.org>,
        Brendan Jackman <jackmanb@...gle.com>,
        Joe Stringer <joe@...ium.io>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Hangbin Liu <liuhangbin@...il.com>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        Lorenz Bauer <lmb@...udflare.com>,
        Dave Marchevsky <davemarchevsky@...com>,
        Luke Nelson <luke.r.nels@...il.com>,
        Björn Töpel <bjorn@...nel.org>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH bpf-next 1/2] bpf: Add ifindex to bpf_sk_lookup

Alexei Starovoitov wrote:
> On Fri, Oct 15, 2021 at 4:24 AM Mark Pashmfouroush
> <markpash@...udflare.com> wrote:
> >
> > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> > index 6fc59d61937a..9bd3e8b8a659 100644
> > --- a/include/uapi/linux/bpf.h
> > +++ b/include/uapi/linux/bpf.h
> > @@ -6262,6 +6262,7 @@ struct bpf_sk_lookup {
> >         __u32 local_ip4;        /* Network byte order */
> >         __u32 local_ip6[4];     /* Network byte order */
> >         __u32 local_port;       /* Host byte order */
> > +       __u32 ifindex;          /* Maps to skb->dev->ifindex */
> 
> Is the comment accurate?
> The bpf_sk_lookup_kern ifindex is populated with inet_iif(skb).
> Which is skb->skb_iif at this point (I think).
> skb->dev->ifindex would typically mean destination or egress ifindex.
> In __sk_buff we have 'ifindex' and 'ingress_ifindex' to differentiate them.
> If it's really dev->ifindex than keeping 'ifindex' name here would be correct,
> but looking at how it's populated in inet/udp_lookup makes me wonder
> whether it should be named 'ingress_ifindex' instead and comment clarified.
> 
> If/when you resubmit please trim cc list to a minimum.

At least in the tcp cases its coming from inet_iif which is either
the rtable or skb->skb_iif. Agree would be nice to fixup the comment.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ