DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Andrew Rybchenko <arybchenko@solarflare.com>,
	dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	david.marchand@redhat.com
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] mk: remove library search path from binary
Date: Thu, 21 Nov 2019 17:12:54 +0000	[thread overview]
Message-ID: <5b9ae095-6926-b67a-6368-29db57782213@intel.com> (raw)
In-Reply-To: <3766664.SyXFxqzVBa@xps>

On 11/18/2019 3:14 PM, 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
> 
> 
>> RPATH only added in RTE_DEVEL_BUILD case and this binary shouldn't
>> distributed, but still removing it to be cautious.
> 
> For convenience, we could keep adding rpath for internal apps.

This was the main intention, but the concern is someone unaware of this
capability and distributes a binary that we think it will be internal.

> 
> 
>> --- a/devtools/test-null.sh
>> +++ b/devtools/test-null.sh
> 
>>  if ldd $testpmd | grep -q librte_ ; then
>> +	export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH
>>  	libs='-d librte_mempool_ring.so -d librte_pmd_null.so'
> 
> 
> There is an issue in this change, because $build may be undefined.
> It can be fixed with adding this line:
> 
> +[ -f "$testpmd" ] && build=$(dirname $(dirname $testpmd))
>  [ -f "$testpmd" ] || testpmd=$build/app/dpdk-testpmd
>  [ -f "$testpmd" ] || testpmd=$build/app/testpmd

'build' is already defined as following at the beginning of the script
build=${1:-build}

And if 'build' is wrong/missing, script can't reach to this line at all, because
'testpmd' path found based on 'build' and if 'testpmd' not found, script will exit.

Can you please give more detail what is problem with 'build'?

  parent reply	other threads:[~2019-11-21 17:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 13:15 [dpdk-dev] " Ferruh Yigit
2019-11-18 15:14 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-11-18 15:30   ` Bruce Richardson
2019-11-18 15:34     ` Bruce Richardson
2019-11-21 17:12   ` Ferruh Yigit [this message]
2019-11-21 21:17     ` Thomas Monjalon
2019-11-22 11:30 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2019-11-25 22:11   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b9ae095-6926-b67a-6368-29db57782213@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).