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: <CAJ0CqmWGNapcmVae52UJNAg7XKS7f0F2dmQMoO+1sL3zp=oFTw@mail.gmail.com>
Date:   Fri, 3 Sep 2021 19:13:18 +0200
From:   Lorenzo Bianconi <lorenzo.bianconi@...hat.com>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     Lorenzo Bianconi <lorenzo@...nel.org>,
        BPF-dev-list <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        "Agroskin, Shay" <shayagr@...zon.com>,
        David Ahern <dsahern@...nel.org>,
        Jesper Brouer <brouer@...hat.com>,
        Eelco Chaudron <echaudro@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Alexander Duyck <alexander.duyck@...il.com>,
        Saeed Mahameed <saeed@...nel.org>,
        Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        "Sarkar, Tirthendu" <tirthendu.sarkar@...el.com>,
        Toke Hoiland Jorgensen <toke@...hat.com>
Subject: Re: [PATCH v12 bpf-next 01/18] net: skbuff: add size metadata to
 skb_shared_info for xdp

>
> Lorenzo Bianconi wrote:
> > Introduce xdp_frags_tsize field in skb_shared_info data structure
> > to store xdp_buff/xdp_frame truesize (xdp_frags_tsize will be used
> > in xdp multi-buff support). In order to not increase skb_shared_info
> > size we will use a hole due to skb_shared_info alignment.
> > Introduce xdp_frags_size field in skb_shared_info data structure
> > reusing gso_type field in order to store xdp_buff/xdp_frame paged size.
> > xdp_frags_size will be used in xdp multi-buff support.
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
>
> I assume we can use xdp_frags_tsize for anything else above XDP later?
> Other than simple question looks OK to me.

yes, right as we did for gso_type/xdp_frags_size.

Regards,
Lorenzo

>
> Acked-by: John Fastabend <john.fastabend@...il.com>
>
> > ---
> >  include/linux/skbuff.h | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> > index 6bdb0db3e825..1abeba7ef82e 100644
> > --- a/include/linux/skbuff.h
> > +++ b/include/linux/skbuff.h
> > @@ -522,13 +522,17 @@ struct skb_shared_info {
> >       unsigned short  gso_segs;
> >       struct sk_buff  *frag_list;
> >       struct skb_shared_hwtstamps hwtstamps;
> > -     unsigned int    gso_type;
> > +     union {
> > +             unsigned int    gso_type;
> > +             unsigned int    xdp_frags_size;
> > +     };
> >       u32             tskey;
> >
> >       /*
> >        * Warning : all fields before dataref are cleared in __alloc_skb()
> >        */
> >       atomic_t        dataref;
> > +     unsigned int    xdp_frags_tsize;
> >
> >       /* Intermediate layers must ensure that destructor_arg
> >        * remains valid until skb destructor */
> > --
> > 2.31.1
> >
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ