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 B0D1DA0350; Mon, 18 Nov 2019 16:34:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D921B62; Mon, 18 Nov 2019 16:34:53 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 89BD9A69 for ; Mon, 18 Nov 2019 16:34:51 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2019 07:34:50 -0800 X-IronPort-AV: E=Sophos;i="5.68,320,1569308400"; d="scan'208";a="200004006" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.46]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Nov 2019 07:34:48 -0800 Date: Mon, 18 Nov 2019 15:34:45 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org, david.marchand@redhat.com Message-ID: <20191118153445.GB1527@bricha3-MOBL.ger.corp.intel.com> References: <20191112131556.16668-1-ferruh.yigit@intel.com> <3766664.SyXFxqzVBa@xps> <20191118153032.GA1527@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191118153032.GA1527@bricha3-MOBL.ger.corp.intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] mk: remove library search path from binary 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, Nov 18, 2019 at 03:30:32PM +0000, Bruce Richardson wrote: > On Mon, Nov 18, 2019 at 04:14:54PM +0100, Thomas Monjalon wrote: > > 12/11/2019 14:15, Ferruh Yigit: > > > This patch functionally reverts the patch in fixes line to not have any > > > hardcoded library path in the final binary for the security reasons, in > > > case this binary distributed to production environment. > > > > What about meson? > > There are these rpaths: > > $ORIGIN/../lib > > $ORIGIN/../drivers > > > > Meson uses relative paths based off the file location "$ORIGIN" as you see > above. This avoids having a user's home path in the search directories. > > However, meson also adjusts the rpath on install, so if you run > test-meson-builds.sh and check the rpath on > build-x64-default/app/dpdk-testpmd and compare against > build-x86-default/install-root/usr/local/bin/dpdk-testpmd you'll see they > are different, with the latter having the final install path encoded in it. > If we do want to control these, they can be set for binaries using the > "build_rpath" and "install_rpath" parameters, though I think the current > values are ok. > > /Bruce Apologies for the self-reply, but forgot to include the reference to the relevant parameters [1], and they should apply for both executables and libraries [2]. [1] https://mesonbuild.com/Reference-manual.html#executable [2] https://mesonbuild.com/Reference-manual.html#library