[dpdk-stable] patch 'crypto/scheduler: fix build with gcc 8.2' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:11:23 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.5

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/01/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Yongseok

---
>From 148585ff283bb71dcb1037b972ed3bf6a68859a1 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob at caviumnetworks.com>
Date: Sat, 3 Nov 2018 14:58:53 +0000
Subject: [PATCH] crypto/scheduler: fix build with gcc 8.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ backported from upstream commit e5e193acf09c9d4b08e8ed7f2bf9a61b5c204fff ]

build_error:

drivers/crypto/scheduler/scheduler_pmd.c: In function ‘parse_name_arg’:
drivers/crypto/scheduler/scheduler_pmd.c:372:2: error: ‘strncpy’
specified bound 64 equals destination size [-Werror=stringop-truncation]
  strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
strncpy may result a not null-terminated string,
replaced it with strlcpy

Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")

Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---
 drivers/crypto/scheduler/scheduler_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index fcba1197e..07acd7b93 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -37,6 +37,7 @@
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_reorder.h>
+#include <rte_string_fns.h>
 
 #include "rte_cryptodev_scheduler.h"
 #include "scheduler_pmd_private.h"
@@ -342,7 +343,7 @@ parse_name_arg(const char *key __rte_unused,
 		return -EINVAL;
 	}
 
-	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+	strlcpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
 
 	return 0;
 }
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 15:01:49.133643121 -0800
+++ 0089-crypto-scheduler-fix-build-with-gcc-8.2.patch	2018-11-29 15:01:45.240961000 -0800
@@ -1,4 +1,4 @@
-From e5e193acf09c9d4b08e8ed7f2bf9a61b5c204fff Mon Sep 17 00:00:00 2001
+From 148585ff283bb71dcb1037b972ed3bf6a68859a1 Mon Sep 17 00:00:00 2001
 From: Jerin Jacob <jerin.jacob at caviumnetworks.com>
 Date: Sat, 3 Nov 2018 14:58:53 +0000
 Subject: [PATCH] crypto/scheduler: fix build with gcc 8.2
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ backported from upstream commit e5e193acf09c9d4b08e8ed7f2bf9a61b5c204fff ]
+
 build_error:
 
 drivers/crypto/scheduler/scheduler_pmd.c: In function ‘parse_name_arg’:
@@ -17,18 +19,25 @@
 replaced it with strlcpy
 
 Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
-Cc: stable at dpdk.org
 
 Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
 ---
- drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ drivers/crypto/scheduler/scheduler_pmd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
-index 20198ccb0..a1632a2b9 100644
+index fcba1197e..07acd7b93 100644
 --- a/drivers/crypto/scheduler/scheduler_pmd.c
 +++ b/drivers/crypto/scheduler/scheduler_pmd.c
-@@ -369,7 +369,7 @@ parse_name_arg(const char *key __rte_unused,
+@@ -37,6 +37,7 @@
+ #include <rte_malloc.h>
+ #include <rte_cpuflags.h>
+ #include <rte_reorder.h>
++#include <rte_string_fns.h>
+ 
+ #include "rte_cryptodev_scheduler.h"
+ #include "scheduler_pmd_private.h"
+@@ -342,7 +343,7 @@ parse_name_arg(const char *key __rte_unused,
  		return -EINVAL;
  	}
  


More information about the stable mailing list