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: <20190411173930.51fec773@carbon>
Date:   Thu, 11 Apr 2019 17:39:30 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Song Liu <liu.song.a23@...il.com>
Cc:     Networking <netdev@...r.kernel.org>,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        bpf <bpf@...r.kernel.org>,
        Toke Høiland-Jørgensen <toke@...e.dk>,
        brouer@...hat.com
Subject: Re: [PATCH bpf-next 3/5] net: core: introduce build_skb_around

On Wed, 10 Apr 2019 16:34:29 -0700
Song Liu <liu.song.a23@...il.com> wrote:

> > +struct sk_buff *build_skb_around(struct sk_buff *skb,
> > +                                void *data, unsigned int frag_size)
> > +{
> > +       if (unlikely(!skb))
> > +               return NULL;
> > +
> > +       skb = __build_skb_around(skb, data, frag_size);  
> 
> 
> > +
> > +       if (skb && frag_size) {
> > +               skb->head_frag = 1;
> > +               if (page_is_pfmemalloc(virt_to_head_page(data)))
> > +                       skb->pfmemalloc = 1;
> > +       }  
> 
> I didn't find any explanation of this part (head_frag, pfmemalloc).
> Shall we split it out to a separate patch?

No, it belongs here.  This is like/based on the __build_skb() and
build_skb() split, and needed such that __build_skb() can reuse the
code in __build_skb_around().

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ