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: <YHCat5EXRwJZHdZT@lore-desk>
Date:   Fri, 9 Apr 2021 20:19:35 +0200
From:   Lorenzo Bianconi <lorenzo@...nel.org>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org,
        lorenzo.bianconi@...hat.com, davem@...emloft.net, kuba@...nel.org,
        ast@...nel.org, daniel@...earbox.net, shayagr@...zon.com,
        sameehj@...zon.com, john.fastabend@...il.com, dsahern@...nel.org,
        brouer@...hat.com, echaudro@...hat.com, jasowang@...hat.com,
        alexander.duyck@...il.com, saeed@...nel.org,
        maciej.fijalkowski@...el.com
Subject: Re: [PATCH v8 bpf-next 09/14] bpd: add multi-buffer support to xdp
 copy helpers

> On Thu, Apr 08, 2021 at 02:51:01PM +0200, Lorenzo Bianconi wrote:
> > From: Eelco Chaudron <echaudro@...hat.com>
> > 
> > This patch adds support for multi-buffer for the following helpers:
> >   - bpf_xdp_output()
> >   - bpf_perf_event_output()
> > 
> > Signed-off-by: Eelco Chaudron <echaudro@...hat.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> > ---
> > diff --git a/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c b/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
> > index a038e827f850..d5a5f603d252 100644
> > --- a/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
> > +++ b/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
> > @@ -27,6 +27,7 @@ struct xdp_buff {
> >  	void *data_hard_start;
> >  	unsigned long handle;
> >  	struct xdp_rxq_info *rxq;
> > +	__u32 frame_length;
> 
> This patch will not work without patch 10, so could you change the order?

ack, I will fix it in v9

Regards,
Lorenzo

> 
> >  } __attribute__((preserve_access_index));
> >  
> >  struct meta {
> > @@ -49,7 +50,7 @@ int BPF_PROG(trace_on_entry, struct xdp_buff *xdp)
> >  	void *data = (void *)(long)xdp->data;
> >  
> >  	meta.ifindex = xdp->rxq->dev->ifindex;
> > -	meta.pkt_len = data_end - data;
> > +	meta.pkt_len = xdp->frame_length;
> >  	bpf_xdp_output(xdp, &perf_buf_map,
> >  		       ((__u64) meta.pkt_len << 32) |
> >  		       BPF_F_CURRENT_CPU,
> > -- 
> > 2.30.2
> > 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ