Message ID | 20200422181524.18679-1-dg@adax.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4155EA00C2; Wed, 22 Apr 2020 20:16:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F32D1D554; Wed, 22 Apr 2020 20:16:11 +0200 (CEST) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 1A4F51D151 for <dev@dpdk.org>; Wed, 22 Apr 2020 20:16:11 +0200 (CEST) Received: by mail-qk1-f193.google.com with SMTP id m67so3389644qke.12 for <dev@dpdk.org>; Wed, 22 Apr 2020 11:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7y6ZSFTimMV0Bd374P4Y+0CrUCrQVnh736rW4zKIW/U=; b=pOqNDUIjcx5qxyqn0HQRsyzcZE9kQ6u1VY2zEAu1PXq5gVBOo7RA7s2hcKxSNXAml/ vj3zbUXgROoSwdrL0Sptjzx4dV1voKubOrrs1HaWsfJdwtt2QDCYDLmVJ2F8P9QnX69I c8lw6kkH0uL11wscAdIvrZhVC8zbmFcpoLcU2AeIbv9AFwgwIqPsfYdHGxlzhCXi7AQr AekdQcznLOoei9SIKfgjOXkD95XvgW00LYaBKjCC9yi/p4w3onoFytZN4Oedf+AzBALi rgtrKf7Fgfr+Ws4YM9JXwKmZxc95p6/oEh822yNA96uMxpXWpxxmhR3PV5zTGxaUbDCH HwmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7y6ZSFTimMV0Bd374P4Y+0CrUCrQVnh736rW4zKIW/U=; b=oy5rJTdM+lJ9HPRFsd8jbt2vSK44eCE/1GeAhmDW4W+rYPQRT64HBqpe3Nm4d4YCJZ SqrmWYWQCH/8e6CN3teEsjzIj0X6a/hKOfw4EJbyLHl87poenF4zwLNd/RL5upj2lyD/ yi5yChSFv+zAir1X8poIUuf2hb0iMneb/wEeTZc4nMGaFeztO8NFyrXnD/yKG2Wr5lmo H1X+PBvo6Twb48CvwJ2EKjV1GxGMxvS2xU47D5LZe+/iKiWHuNA91HjdWj5zo6KcyX/U tAkyuH1NKXEvEw0qFfY/HAnOEBK3O3ErHZCjFtYkfaP1o4G9onsKT0HGyxyzcfJUfoBH 8Gsg== X-Gm-Message-State: AGi0PuZS2X7Jnh85J+w+fMsVXdye/hjPhUqgXQGRyH8fpfiXtj2Ji6mQ a1Kn7tBF0rfQZU7LJxNVKACdFL1RyFI= X-Google-Smtp-Source: APiQypKo3ZynOhnqbIpp30CfguBIrBegvlkmZHVx+3xyWxctNOgiZtG3E6jv6MAa3Hs49la5xzV0lA== X-Received: by 2002:a37:6415:: with SMTP id y21mr18667156qkb.258.1587579369794; Wed, 22 Apr 2020 11:16:09 -0700 (PDT) Received: from localhost.localdomain ([168.121.99.161]) by smtp.gmail.com with ESMTPSA id d26sm4360227qkk.69.2020.04.22.11.16.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Apr 2020 11:16:08 -0700 (PDT) From: Dan Gora <dg@adax.com> To: dev@dpdk.org Cc: David Marchand <david.marchand@redhat.com>, Jerin Jacob <jerinjacobk@gmail.com>, =?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>, Dan Gora <dg@adax.com> Date: Wed, 22 Apr 2020 15:15:22 -0300 Message-Id: <20200422181524.18679-1-dg@adax.com> X-Mailer: git-send-email 2.24.1.425.g7034cd094b In-Reply-To: <20200421195446.1730-1-dg@adax.com> References: <20200421195446.1730-1-dg@adax.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
eal: choose initial PRNG seed source at runtime
|
|
Message
Dan Gora
April 22, 2020, 6:15 p.m. UTC
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 and removes the requirement for it on the execution system. It also ensures 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 enables dynamic checking for the getentropy() function using dlload()/dlsym() to allow the code to use getentropy() if it is available on the execution system, regardless of whether or not it was available on the compilation system. 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. Dan Gora (2): eal: check for rdseed at run time for random seed eal: resolve getentropy at run time for random seed config/x86/meson.build | 11 +++++-- lib/librte_eal/common/rte_random.c | 53 ++++++++++++++++++++++-------- lib/librte_eal/meson.build | 3 -- mk/rte.cpuflags.mk | 9 +++-- 4 files changed, 55 insertions(+), 21 deletions(-)