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] [day] [month] [year] [list]
Date:   Wed, 17 Nov 2021 12:12:58 +0100
From:   Lorenzo Bianconi <lorenzo@...nel.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org,
        lorenzo.bianconi@...hat.com, davem@...emloft.net, ast@...nel.org,
        daniel@...earbox.net, shayagr@...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, magnus.karlsson@...el.com,
        tirthendu.sarkar@...el.com, toke@...hat.com
Subject: Re: [PATCH v18 bpf-next 20/23] net: xdp: introduce bpf_xdp_pointer
 utility routine

> On Wed, 17 Nov 2021 01:12:41 +0100 Lorenzo Bianconi wrote:
> > ack, you are right. Sorry for the issue.
> > I did not trigger the problem with xdp-mb self-tests since we will not run
> > bpf_xdp_copy_buf() in this specific case, but just the memcpy()
> > (but what you reported is a bug and must be fixed). I will add more
> > self-tests.
> > Moreover, reviewing the code I guess we can just update bpf_xdp_copy() for our case.
> > Something like:
> 
> Seems reasonable.  We could probably play some tricks with double
> pointers to avoid the ternary operator being re-evaluated for each
> chunk. But even if it's faster it is probably not worth the ugliness
> of the code.

ack, moreover I guess the slowest operation here is the mempcy().
I added a new self-test to cover the case where buf is across frag0
and frag1.
I will wait for some more feedbacks and then I will post a new version.
Thanks.

Regards,
Lorenzo

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