[PATCH v5 00/32] replace use of rte_memcpy() with fixed size

Stephen Hemminger stephen at networkplumber.org
Mon May 27 01:32:32 CEST 2024


On Sun, 26 May 2024 16:51:52 +0200
Mattias Rönnblom <hofors at lysator.liu.se> wrote:

> > This does not change the resulting binary on almost all architectures
> > because x86 version of intrisics and glibc are the same, and
> > other architectures were using __builtin_constant_p().
> > 
> > The main benefit is that analysis tools like fortify, Coverity, and ASAN
> > analyzers can check these memcpy's. A recent example is that
> > on Ubuntu 22.04 detected undefined use of memcpy such as:
> > 	memcpy(dst, NULL, 0)
> >   
> 
> Would it be possible to instead have a build mode where rte_memcpy() is 
> *always* delegating to memcpy(), and run these tools on that configuration?
> 
> It seems easier to just always using rte_memcpy() in DPDK code, then let 
> the platform (not the programmer) choose whatever is most appropriate.

I would prefer that rte_memcpy be laid to rest and go away.
It never had a reason to be there.


More information about the dev mailing list