From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3217BA0350; Mon, 29 Jun 2020 20:04:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A13181BE94; Mon, 29 Jun 2020 20:04:55 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id B23EE1B6B4 for ; Mon, 29 Jun 2020 20:04:53 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id i4so18132017iov.11 for ; Mon, 29 Jun 2020 11:04:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YdY9UCY/DR2uJP5/vTijXXxO8+tsMnP57rNm4graDPU=; b=UyI/hq2/Fq6da8Cw0caDTcK9s1buQ1f7INfiyGBgl0AO7sbPUoIwEp9JQOhY3Dk2Pa TgqO0FdrsGy8gYMbQMaReBpvhMT5XrOZ7XFIKLGtuAvlIzn1DGxHv7sbnngyUl9zvwVo WoIBuwwIsKM92MNbjCvbdlHRhBAMt6WaZLQKqj8aW6bJ4XTROwCpH8myRRBrIclMuIrm 6PrWXuGlk5RLDm+AoicE/eVFQoJmNPWTpoxdkMpQ4YQlX8L5UmjQqv3bWraxI/g49IGY mSJQrQGv6qlUUDVsww+Qg9oHwtjh7zZ+GPo0tJOjlgaBGXuUmpV+TBOwWU0bsAZTDZXG B/5A== X-Gm-Message-State: AOAM532wymFVE7Qf9DFEAVzo7p8Pxmp2LGgFIIGLrbwMkzCiPra/xguD rX+IHnBmXNJPqZjj45FIgNvCi4bYKkcoIDfLBMI= X-Google-Smtp-Source: ABdhPJwhUxFWm+IM9dMpUEz41OPVHFvoRUfeeGovChkQW3givXsEvNGbTJ+3HkqI5ZvpD/0P8xt3oM+EVcnDnJP+9fY= X-Received: by 2002:a5e:980f:: with SMTP id s15mr17790210ioj.47.1593453893038; Mon, 29 Jun 2020 11:04:53 -0700 (PDT) MIME-Version: 1.0 References: <20200421195446.1730-1-dg@adax.com> <20200422234255.7066-1-dg@adax.com> <7c4c38bb-ecec-8cad-1220-c6a057574e0e@ericsson.com> In-Reply-To: From: Dan Gora Date: Mon, 29 Jun 2020 15:04:17 -0300 Message-ID: To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: "dev@dpdk.org" , David Marchand , Jerin Jacob Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v4 0/2] eal: choose initial PRNG seed source at runtime 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 Mon, Jun 29, 2020 at 3:01 PM Dan Gora wrote: > > On Mon, Jun 29, 2020 at 6:32 AM Mattias R=C3=B6nnblom > wrote: > > > > On 2020-04-23 01:42, Dan Gora wrote: > > > Hi All, > > > > > > The following patches updates the rte_random subsystem to dynamically= find > > > the best source of the initial seed to the PRNG at run time. > > > > > > The first patch enables dynamic checking for the rdseed instruction a= nd > > > removes the requirement for it on the execution system. It also ensu= res > > > that the code to use the rdseed instruction is generated, even if the= host > > > compilation system does not support it (on x86 systems). > > > > > > The second patch emulates the getentropy() glibc function by reading = bytes > > > from /dev/urandom. This removes an unnecessary dependency on glibc 2= .25. > > > > > > v4: Note that emulating getentropy by reading from /dev/urandom shou= ld > > > never fail, so now the question is if we should just remove the rdsee= d > > > method entirely since it's x86 only? Should we remove the fallback t= o > > > rte_get_tsc_cycles()? > > > > > > Thanks > > > Dan > > > > > > ----- > > > v2: > > > * Fix patch apply issue. > > > * dlclose() handle if dlsym() fails in __rte_getentropy(). > > > > > > v3: > > > * Fix error checking of dlsym() in __rte_getentropy(). > > > * Style changes recommended by Mattias. > > > > > > v4: > > > * Replace dlopen/dlsym method with reading from /dev/urandom. > > > * Try rdseed method before getentropy() method since the > > > latter should never fail. > > > > > > I see no reason to prefer rdseed over the kernel. It even says why right here: > > > * Try rdseed method before getentropy() method since the > > > latter should never fail. *******since the latter should never fail******* Did you see that part? thanks dan