DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, stable@dpdk.org,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: Re: [PATCH 02/18] random: always use getentropy
Date: Tue, 10 Nov 2026 18:51:00 +0000	[thread overview]
Message-ID: <avNnlLwnCJWHN-aJ@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260915192207.3926217-3-stephen@networkplumber.org>

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: stable@dpdk.org
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  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 <bruce.richardson@intel.com>


  reply	other threads:[~2026-11-10 18:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 19:20 [PATCH 00/18] random number generator improvements Stephen Hemminger
2026-09-15 19:20 ` [PATCH 01/18] eal/windows: add getentropy shim Stephen Hemminger
2026-09-15 19:21 ` [PATCH 02/18] random: always use getentropy Stephen Hemminger
2026-11-10 18:51   ` Bruce Richardson [this message]
2026-09-15 19:21 ` [PATCH 03/18] eal: add 32 bit random number function Stephen Hemminger
2026-09-15 19:21 ` [PATCH 04/18] sched: fix data race in RED random number generation Stephen Hemminger
2026-09-15 19:21 ` [PATCH 05/18] eal/windows: add getrandom shim Stephen Hemminger
2026-09-15 19:21 ` [PATCH 06/18] eal: add function to get random bytes Stephen Hemminger
2026-09-15 19:21 ` [PATCH 07/18] hash: use secure random for Toeplitz hash key Stephen Hemminger
2026-09-15 19:21 ` [PATCH 08/18] pipeline: use secure random for IPsec salt Stephen Hemminger
2026-09-15 19:21 ` [PATCH 09/18] net: use secure random for random MAC address Stephen Hemminger
2026-09-15 19:21 ` [PATCH 10/18] ipsec: use secure random for SAD hash seed Stephen Hemminger
2026-09-15 19:21 ` [PATCH 11/18] net/intel: use secure random for default RSS key Stephen Hemminger
2026-09-15 19:21 ` [PATCH 12/18] random: use all 64 bits of the seed Stephen Hemminger
2026-09-15 19:21 ` [PATCH 13/18] drivers/net: use secure random for RSS key Stephen Hemminger
2026-09-15 19:21 ` [PATCH 14/18] drivers/net: use common random MAC address helper Stephen Hemminger
2026-09-15 19:21 ` [PATCH 15/18] random: remove RDSEED fallback for initial seed Stephen Hemminger
2026-09-16  7:44   ` Bruce Richardson
2026-09-15 19:21 ` [PATCH 16/18] test: allow setting random seed for tests Stephen Hemminger
2026-09-15 19:21 ` [PATCH 17/18] test: add random number generator tests Stephen Hemminger
2026-09-15 19:21 ` [PATCH 18/18] doc: recommend secure random for unpredictable values Stephen Hemminger
2026-09-22 12:32   ` Aaron Conole
2026-10-10  2:27 ` [PATCH v2 0/5] random: fix initial seed entropy Stephen Hemminger
2026-10-10  2:27   ` [PATCH v2 1/5] eal/windows: add getentropy shim Stephen Hemminger
2026-10-10  2:27   ` [PATCH v2 2/5] random: always use getentropy Stephen Hemminger
2026-10-10  2:27   ` [PATCH v2 3/5] random: use all 64 bits of the seed Stephen Hemminger
2026-10-10  2:27   ` [PATCH v2 4/5] random: remove RDSEED fallback for initial seed Stephen Hemminger
2026-10-10  2:27   ` [PATCH v2 5/5] test: allow setting random seed for tests Stephen Hemminger
2026-11-27 19:39 ` [PATCH v3 0/5] random: fix initial seed entropy Stephen Hemminger
2026-11-27 19:39   ` [PATCH v3 1/5] eal/windows: add getentropy shim Stephen Hemminger
2026-11-27 19:39   ` [PATCH v3 2/5] random: always use getentropy Stephen Hemminger
2026-11-27 19:39   ` [PATCH v3 3/5] random: use all 64 bits of the seed Stephen Hemminger
2026-11-27 19:39   ` [PATCH v3 4/5] random: remove RDSEED fallback for initial seed Stephen Hemminger
2026-11-27 19:39   ` [PATCH v3 5/5] test: allow setting random seed for tests Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avNnlLwnCJWHN-aJ@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox