[v2,0/2] eal: choose initial PRNG seed source at runtime
Message ID | 20200421204115.31950-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 CE007A05A0; Tue, 21 Apr 2020 22:41:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BFAA1D413; Tue, 21 Apr 2020 22:41:27 +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 68ECF1D40E for <dev@dpdk.org>; Tue, 21 Apr 2020 22:41:26 +0200 (CEST) Received: by mail-qk1-f193.google.com with SMTP id j4so114941qkc.11 for <dev@dpdk.org>; Tue, 21 Apr 2020 13:41:26 -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=jzYqUTNyy9Y01WOe4RgcDB0+MW5wvZjUld7ddYSNX4w=; b=mAb2Fc9EhOZVRXkYsDSdfdCAYCCayp8e8rjCW0RVmVn1MRKXubU280yPfMtgWtOdhm GaxOA5gHYBkbe07vojOxuDQypxf1MDxNzHRLyMBvwwwOv5y+zWq7FFzYohRO0kbywSKc 8FJC5qGDN51d8Br8lDIT0Y8+sEalLrLbh/Pba4icKupmJvMQ5t9cwPF6OUx1wr7BlPuB fm0Ux3Pg5QHRQJzLnBKbcw8exDL9hPjc2atE2FVvb3RiJQYknfAOMkCcpJNfFI/hAYwb 2HBFWf7BnqKY0YbOKzdrfPpkv/cHRu+YkHQ7/+w8lSDNJaaPiJaKJEOF85Yv7sgJJLLN knfw== 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=jzYqUTNyy9Y01WOe4RgcDB0+MW5wvZjUld7ddYSNX4w=; b=swHoYjnsUHr5n9MwjFxWMTfoC0XqTGxbxlTRl0IeRS/dbzVCRF09RC6evveqw57x8j h+5HPHSnWitoZxu7KopXF26X5MbuyqYNX7XwspDrfFXzqJnD0b00R6t3tJei4ko8vl05 hiouj4ToPkrYb48uxoa/gWCoALNNcXwymjBLmYYYKnGX2J3I9HcEfs+1ysjndxu8bYqE H7DyjIOcVypsWlwuf0A68kO2Eax7kbLqk7VohAnF7dfUsMUM/jPdJzoFBpR1DvvsfmrV t0HIcGk/285usfN5NC1G1e3gTEvp57ZC278GkVqnB4oWDbNjDyg6iZVkk+/d21zO/qWX 9tog== X-Gm-Message-State: AGi0PuYeZj+1uDMStv6awn99VOgD2HgOr6RZCTHRjyJLWijlugIm1jHI yG0d0pETpEIRqmL+11Tyv1ZF30XSb+s= X-Google-Smtp-Source: APiQypIjO1ZozFuDlmvPrblrh/Zxl0+W4sRlQB5oIEsQCyLkxAJnLPwoIINMkRj9JByE2AUh63rSeg== X-Received: by 2002:a37:2e42:: with SMTP id u63mr21246987qkh.181.1587501685338; Tue, 21 Apr 2020 13:41:25 -0700 (PDT) Received: from localhost.localdomain ([168.121.99.161]) by smtp.gmail.com with ESMTPSA id d23sm2431067qkj.26.2020.04.21.13.41.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2020 13:41:24 -0700 (PDT) From: Dan Gora <dg@adax.com> To: dev@dpdk.org Cc: David Marchand <david.marchand@redhat.com>, Jerin Jacob <jerinjacobk@gmail.com>, Dan Gora <dg@adax.com> Date: Tue, 21 Apr 2020 17:41:13 -0300 Message-Id: <20200421204115.31950-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 v2 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> |
Message
Dan Gora
April 21, 2020, 8:41 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(). 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 | 52 ++++++++++++++++++++++-------- lib/librte_eal/meson.build | 3 -- mk/rte.cpuflags.mk | 9 ++++-- 4 files changed, 54 insertions(+), 21 deletions(-)