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]
Message-ID: <CAKH8qBvUtpVA2WgeV0wyNK=sZ1kQV7bnWLKCCDuqM2Anry1weQ@mail.gmail.com>
Date:   Wed, 16 Nov 2022 12:53:43 -0800
From:   Stanislav Fomichev <sdf@...gle.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
        andrii@...nel.org, martin.lau@...ux.dev, song@...nel.org,
        yhs@...com, john.fastabend@...il.com, kpsingh@...nel.org,
        haoluo@...gle.com, jolsa@...nel.org,
        David Ahern <dsahern@...il.com>,
        Willem de Bruijn <willemb@...gle.com>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Anatoly Burakov <anatoly.burakov@...el.com>,
        Alexander Lobakin <alexandr.lobakin@...el.com>,
        Magnus Karlsson <magnus.karlsson@...il.com>,
        Maryam Tahhan <mtahhan@...hat.com>, xdp-hints@...-project.net,
        netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next 03/11] bpf: Support inlined/unrolled kfuncs for
 xdp metadata

On Wed, Nov 16, 2022 at 12:43 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 14 Nov 2022 19:02:02 -0800 Stanislav Fomichev wrote:
> > diff --git a/net/core/dev.c b/net/core/dev.c
> > index 117e830cabb0..a2227f4f4a0b 100644
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -9258,6 +9258,13 @@ static int dev_xdp_attach(struct net_device *dev, struct netlink_ext_ack *extack
> >                       return -EOPNOTSUPP;
> >               }
> >
> > +             if (new_prog &&
> > +                 new_prog->aux->xdp_kfunc_ndo &&
> > +                 new_prog->aux->xdp_kfunc_ndo != dev->netdev_ops) {
> > +                     NL_SET_ERR_MSG(extack, "Cannot attach to a different target device");
> > +                     return -EINVAL;
> > +             }
>
> This chunk can go up into the large
>
>         if (new_prog) {
>                 ...
>
> list of checks?

Agreed, will move!

> nit: aux->xdp_kfunc_ndo sounds like you're storing the kfunc NDO,
>      not all ndos. Throw in an 's' at the end, or some such?

SG. But I'll most likely replace this xdp_kfunc_ndo with something
like xdp_netdev and to add proper refcounting.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ