[PATCH] rte_memcpy: fix off by one for size 16 and 32
Morten Brørup
mb at smartsharesystems.com
Sat Mar 2 23:10:07 CET 2024
I'm also working on a fix.
Med venlig hilsen / Kind regards,
-Morten Brørup
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Saturday, 2 March 2024 21.57
> To: dev at dpdk.org
> Cc: Morten Brørup; Bruce Richardson; Konstantin Ananyev; Zhihong Wang;
> Yuanhan Liu; Xiaoyun Li
> Subject: Re: [PATCH] rte_memcpy: fix off by one for size 16 and 32
>
> On Sat, 2 Mar 2024 12:49:23 -0800
> Stephen Hemminger <stephen at networkplumber.org> wrote:
>
> > The rte_memcpy code would do extra instructions for size 16
> > and 32 which potentially could reference past end of data.
> >
> > For size of 16, only single mov16 is needed.
> > same for size of 32, only single mov32.
> >
> > Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86")
> > Fixes: d35cc1fe6a7a ("eal/x86: revert select optimized memcpy at run-
> time")
> >
> > Suggested-by: Morten Brørup <mb at smartsharesystems.com>
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
>
> Self-NAK, more is needed here.
>
> The code has lots of pre-existing bugs where it will reference past the
> end
> of the data in some cases.
More information about the dev
mailing list