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 6A8D0A05A0; Tue, 21 Apr 2020 23:03:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B864F1C0CA; Tue, 21 Apr 2020 23:03:16 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 772BC1C0AE for ; Tue, 21 Apr 2020 23:03:15 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id s10so11384plr.1 for ; Tue, 21 Apr 2020 14:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y5ljtLzsiDWvvQNP3ptawJ4vAWOWk2unmxDl8fyyk2M=; b=NobI85VqC+P1GcA3FbzLlD+y+DYEAR8S6YOlhktl30oupAMwGkvBHaAoTBTdDsGTwy 407rRfqCqeuXjWenl7elU42t1kFq4nWPZZJMhfD9wut2uc1+7JnxyIzpZ+cjrVPDuYJw pGslMjkaq9kVmQBFltLhNrK0ab3GWr7FTegfeUmpm8NLXS8h10GstnHfOJtFHALiG5rF 537rqqk9jyBLQ376qthuumkY6tW1pzuPTIY+4XaBt8FyJlmqj0Ig190tT2Ou2VqFq80i 55WpL4Q4KElq8DTSX/re+LzH4d7SrjvbdgCtZAoGbOQENejDoB/KKu8GzMkfjyr7Y6uB aq8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y5ljtLzsiDWvvQNP3ptawJ4vAWOWk2unmxDl8fyyk2M=; b=VfXYVvQEQadMTBZXOeZ02mhHpjOOP+O0dfzYrTKtc6SftMF+GsH5G+rulJiLke4AMA ajOK7jLlYT+a5EL/1125rCPK+n7qTgWYqRi9YpjplvzXOoo0hUlZAZHgDgHQUfsTuQng A3AlIqtKBPgueIPI4iDnijgW8YU8T3mLLgv2Iib7EeIX1HLk3kuEV5HSw91bArGhpezQ f8g4IJx+HhNFxQnzNAZcNX3mn4pwH51od0bcy6bYDQmhMLogumRq/HRhDESjN/+HdJHL o+eOfFYiOy8YAysxgbQq700iF2waL5buatifl/hgWhTEE6QdzPPaP0VyPlpdYoOLwHmA h+kA== X-Gm-Message-State: AGi0PuZTTfMWA6kE70GRzQDvEd3YtfrscrXYjKMABcmDNUYz3i9wiA6O ZmOjrLBvlSBT22U3D9zA+2jmQg== X-Google-Smtp-Source: APiQypJ4maP/oOE0ibxjr/kYLrIIa9C4QBZ6jJiIoEicBWqp8+3yuDlBD3yOVZP+AwNbOMHuOcDLzw== X-Received: by 2002:a17:902:b717:: with SMTP id d23mr22134065pls.51.1587502994452; Tue, 21 Apr 2020 14:03:14 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 11sm2552522pfw.183.2020.04.21.14.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 14:03:14 -0700 (PDT) Date: Tue, 21 Apr 2020 14:03:10 -0700 From: Stephen Hemminger To: Dan Gora Cc: dev@dpdk.org, Mattias =?UTF-8?B?UsO2bm5ibG9t?= , David Marchand , Jerin Jacob Message-ID: <20200421140310.32424051@hermes.lan> In-Reply-To: <20200421195446.1730-3-dg@adax.com> References: <20200421195446.1730-1-dg@adax.com> <20200421195446.1730-3-dg@adax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] eal: resolve getentropy at run time for random 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, 21 Apr 2020 16:54:45 -0300 Dan Gora wrote: > The getentropy() function was introduced into glibc v2.25 and so is > not available on all supported platforms. Previously, if DPDK was > compiled (using meson) on a system which has getentropy(), it would > introduce a dependency on glibc v2.25 which would prevent that binary > from running on a system with an older glibc. Similarly if DPDK was > compiled on a system which did not have getentropy(), getentropy() > could not be used even if the execution system supported it. > > Introduce a new static function, __rte_getentropy() which will try to > resolve the getentropy() function dynamically using dlopen()/dlsym(), > returning failure if the getentropy() function cannot be resolved or > if it fails. > > This also allows getentropy() to be used as the random seed source > when the traditional Makefile build for DPDK is used. > > Signed-off-by: Dan Gora I don't think DPDK has a requirement that building on newer glibc has to work when run on older version. Glibc doesn't support it.