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 51721A05A0; Tue, 21 Apr 2020 21:55:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A7631D182; Tue, 21 Apr 2020 21:55:33 +0200 (CEST) Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) by dpdk.org (Postfix) with ESMTP id 0D9AE1D17A for ; Tue, 21 Apr 2020 21:55:31 +0200 (CEST) Received: by mail-qv1-f65.google.com with SMTP id v10so3130031qvr.2 for ; Tue, 21 Apr 2020 12:55:30 -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:mime-version :content-transfer-encoding; bh=45ZlPqfmXBpXHyNo05QnJUyOuur9PQGnt3kOf9NBad4=; b=P7jLCutCNl7Qoov595ygaccREaji4ODJegD74VTlEljZriVzP2rq3u8L5gkXpjd0N0 IHpWkMxnbeOy723iMeCXcjq4AC4xBvDYEj8tvPhDOtUBHi4Y68+T12tmeAkho09InQbo /ZSDYM5UqdUbMrTyjvZ7hmx+yYLMFx4Tlf3T82qvv1UeVPPdAOxFJxmQoutd/MkM6Nyk BTYr/SzZP+ZpT8TubbNg0oR2HAiwI/LfJQjbrL64GC3AsSdVh0nuunhQMzvtIONAcmWU HEy3zq29Tiicipl+stvYtgUoi09ypiQ68UGp9oxe1wGSNzqz6VH/KkbgPRUQPqlFcJHZ mxvQ== 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 :mime-version:content-transfer-encoding; bh=45ZlPqfmXBpXHyNo05QnJUyOuur9PQGnt3kOf9NBad4=; b=do4OIHWJZ/NVMYgbMF4N7OeK9CsJBtSRa5PLEtO+V5350sJsRVisQuvW5Z1to1V9pk frlC2e/kNsY0+veWuq9DayZecQpHqRW8cD/656J91Y9z+NyuKHkNn0/YT0U3yGTKtv4A TjqnIsV/GzrxzsixceObHLUno/t+/GGSbEz4DHFURi2c+5yOTUiCSkOn9YJQRVU3G/Sw TH7mALBi3WaDkXoJwc9gYK03JLTVCT8KXb7PUaNiW5fYukrECkifXKgncIYS32ipkJ7K rwMQ6eTt+wcVfb7QPKOX89dLoV0VZaLr/lrS5DqYhLjVqFK63HyEigM92J5DcRyD2BJy Gnzw== X-Gm-Message-State: AGi0PuY5nfbuwuEhawAoLanJmz60FrBu0qIXcgLTQ8Rkp/AggilNA8gt scC1SZ9oug/Bf+esX+T4TTVEEHocfaY= X-Google-Smtp-Source: APiQypI4D6Ho66HTbGacHq0b5QgHOQo10ZP2GbKfktpiQBh48W+IgW1QHbocofHxgmqPLx5aajp/vQ== X-Received: by 2002:a05:6214:227:: with SMTP id j7mr22050265qvt.85.1587498929942; Tue, 21 Apr 2020 12:55:29 -0700 (PDT) Received: from localhost.localdomain ([168.121.99.161]) by smtp.gmail.com with ESMTPSA id o94sm2423378qtd.34.2020.04.21.12.55.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2020 12:55:29 -0700 (PDT) From: Dan Gora To: dev@dpdk.org Cc: David Marchand , Jerin Jacob , Dan Gora Date: Tue, 21 Apr 2020 16:54:43 -0300 Message-Id: <20200421195446.1730-1-dg@adax.com> X-Mailer: git-send-email 2.24.1.425.g7034cd094b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 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" 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 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 | 50 ++++++++++++++++++++++-------- lib/librte_eal/meson.build | 3 -- mk/rte.cpuflags.mk | 9 ++++-- 4 files changed, 52 insertions(+), 21 deletions(-) -- 2.24.1.425.g7034cd094b