Thread (86 messages) 86 messages, 7 authors, 2019-06-29

Re: [dpdk-dev] [PATCH 3/6] eal: improve entropy for initial PRNG seed

From: Bruce Richardson <hidden>
Date: 2019-05-14 09:39:30

On Tue, May 14, 2019 at 11:36:49AM +0200, Mattias Rönnblom wrote:
On 2019-05-14 11:20, Mattias Rönnblom wrote:
quoted
Replace the use of rte_get_timer_cycles() with getentropy() for
seeding the pseudo-random number generator. getentropy() provides a
more truly random value.
getentropy() doens't exist in libc versions earler than 2.25, and it also
(like Stephen mentioned) requires the getrandom() syscall not available
until Linux 3.17.

If this is deemed too much of a limitation, I'll change to
/dev/urandom-based seeding.
Since we are shifting over to meson builds more and more, I'd suggest just
using function detection there with a very basic fallback (e.g. your
time-based one) for cases where the function is not supported.

/Bruce
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help