[PATCH 04/12] net/ena: fix build with GCC 12

Morten Brørup mb at smartsharesystems.com
Sat May 21 11:49:47 CEST 2022


> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Friday, 20 May 2022 22.28
> 
> On Wed, 18 May 2022 12:16:49 +0200
> David Marchand <david.marchand at redhat.com> wrote:
> 
> > +		for (i = 0; i < RTE_DIM(default_key); ++i)
> >  			default_key[i] = rte_rand() & 0xff;
> 
> We should have rte_random_bytes() functionality if this gets
> used often.

Since the other pseudorandom functions are called rand, such a function should be named rte_rand_bytes().

> 
> Also, worth considering dropping DPDK random number generator
> in userspace for security reasons and just using more secure kernel
> code.

Absolutely not! We need a fast pseudorandom number generator in DPDK.

If anything, we could consider renaming the functions and header file to reflect that they are pseudorandom number generators, and not (cryptographically) random generators. That would cause an API/ABI breakage, so it's probably not going to happen. ;-)




More information about the stable mailing list