[dpdk-stable] patch 'mk: remove library search path from binary' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:39 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/17/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/72803887d351a6ba3b58aa37ba7801f978711d4f

Thanks.

Kevin.

---
>From 72803887d351a6ba3b58aa37ba7801f978711d4f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Fri, 22 Nov 2019 11:30:23 +0000
Subject: [PATCH] mk: remove library search path from binary

[ upstream commit 6b01864cc9c59a731dbc727a96995fd2b2ff452f ]

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.

RPATH only added in RTE_DEVEL_BUILD case and this binary shouldn't
distributed, but still removing it to be cautious.

Fixes: 8919f73bcbaa ("mk: add build directory to library search path")

Suggested-by: Bruce Richardson <bruce.richardson at intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 devtools/test-null.sh | 1 +
 mk/rte.app.mk         | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/devtools/test-null.sh b/devtools/test-null.sh
index 61879e3e6..da0401dff 100755
--- a/devtools/test-null.sh
+++ b/devtools/test-null.sh
@@ -9,4 +9,5 @@ coremask=${2:-3} # default using cores 0 and 1
 
 if grep -q SHARED_LIB=y $build/.config; then
+	export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH
 	pmd='-d librte_pmd_null.so'
 fi
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index c539bb9c3..8d91909be 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -334,8 +334,4 @@ filter-libs = \
 LDLIBS := $(call filter-libs,$(LDLIBS))
 
-ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy)
-LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib
-endif
-
 MAPFLAGS = -Map=$@.map --cref
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:16.440330059 +0000
+++ 0047-mk-remove-library-search-path-from-binary.patch	2019-12-11 21:24:12.706650411 +0000
@@ -1 +1 @@
-From 6b01864cc9c59a731dbc727a96995fd2b2ff452f Mon Sep 17 00:00:00 2001
+From 72803887d351a6ba3b58aa37ba7801f978711d4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b01864cc9c59a731dbc727a96995fd2b2ff452f ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
- devtools/test-null.sh | 2 ++
+ devtools/test-null.sh | 1 +
@@ -21 +22 @@
- 2 files changed, 2 insertions(+), 4 deletions(-)
+ 2 files changed, 1 insertion(+), 4 deletions(-)
@@ -24 +25 @@
-index d82c6ad19..72aa82b16 100755
+index 61879e3e6..da0401dff 100755
@@ -27,7 +28 @@
-@@ -12,4 +12,5 @@ eal_options=$3
- testpmd_options=$4
- 
-+[ -f "$testpmd" ] && build=$(dirname $(dirname $testpmd))
- [ -f "$testpmd" ] || testpmd=$build/app/dpdk-testpmd
- [ -f "$testpmd" ] || testpmd=$build/app/testpmd
-@@ -20,4 +21,5 @@ fi
+@@ -9,4 +9,5 @@ coremask=${2:-3} # default using cores 0 and 1
@@ -35 +30 @@
- if ldd $testpmd | grep -q librte_ ; then
+ if grep -q SHARED_LIB=y $build/.config; then
@@ -37,2 +32,2 @@
- 	libs='-d librte_mempool_ring.so -d librte_pmd_null.so'
- else
+ 	pmd='-d librte_pmd_null.so'
+ fi
@@ -40 +35 @@
-index a278552c6..05ea034b9 100644
+index c539bb9c3..8d91909be 100644
@@ -43 +38 @@
-@@ -380,8 +380,4 @@ filter-libs = \
+@@ -334,8 +334,4 @@ filter-libs = \



More information about the stable mailing list