On Tue, Sep 15, 2026 at 12:21:00PM -0700, Stephen Hemminger wrote:
> The cc.has_function() check compiled its test program under strict
> -std=c11, where glibc hides the getentropy() declaration behind
> _DEFAULT_SOURCE. The probe therefore always failed on Linux and
> RTE_LIBEAL_USE_GETENTROPY was never defined, silently falling back
> to RDSEED or TSC for the initial PRNG seed.
>
> Now that a getentropy() wrapper exists for Windows it can always be
> enabled. Removing the conditional means any future regression is a
> link error rather than a silent downgrade of seed quality.
>
> Falling back to the TSC now logs at ERR level, including the errno
> from getentropy() so that a blocked syscall can be told apart from
> other failures. A TSC derived seed only varies by process start time,
> which a co-resident attacker can bound.
>
> This requires glibc >= 2.25, which all supported distributions meet.
>
> A backport needs the preceding patch which adds the Windows
> getentropy() shim, otherwise the Windows build breaks.
>
> Bugzilla ID: 2035
> Fixes: faf8fd252785 ("eal: improve entropy for initial PRNG seed")
> Cc: [email protected]
>
> Signed-off-by: Stephen Hemminger <[email protected]>
> ---
> doc/guides/rel_notes/release_26_11.rst | 4 ++++
> lib/eal/common/rte_random.c | 6 ++++--
> lib/eal/include/rte_random.h | 7 ++++---
> lib/eal/meson.build | 3 ---
> 4 files changed, 12 insertions(+), 8 deletions(-)
>
Acked-by: Bruce Richardson <[email protected]>