From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1242C04AB4 for ; Tue, 14 May 2019 09:39:30 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 632C12147A for ; Tue, 14 May 2019 09:39:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 632C12147A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B546A5B40; Tue, 14 May 2019 11:39:28 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CD3615B26 for ; Tue, 14 May 2019 11:39:26 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2019 02:39:25 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.96]) by fmsmga005.fm.intel.com with SMTP; 14 May 2019 02:39:23 -0700 Received: by (sSMTP sendmail emulation); Tue, 14 May 2019 10:39:22 +0100 Date: Tue, 14 May 2019 10:39:22 +0100 From: Bruce Richardson To: Mattias =?iso-8859-1?Q?R=F6nnblom?= Cc: dev@dpdk.org, nhorman@tuxdriver.com, stephen@networkplumber.org, david.marchand@redhat.com Message-ID: <20190514093922.GB592@bricha3-MOBL.ger.corp.intel.com> References: <20190508181014.7dde7580@xps13> <20190514092046.30808-1-mattias.ronnblom@ericsson.com> <20190514092046.30808-4-mattias.ronnblom@ericsson.com> <2a7eddda-db97-40e3-7f75-43b48807f963@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2a7eddda-db97-40e3-7f75-43b48807f963@ericsson.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH 3/6] eal: improve entropy for initial PRNG seed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, May 14, 2019 at 11:36:49AM +0200, Mattias Rönnblom wrote: > On 2019-05-14 11:20, Mattias Rönnblom wrote: > > 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