[dpdk-stable] patch 'examples/fips_validation: fix TDES interim callback' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:59:47 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/20. 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.

Thanks.

Luca Boccassi

---
>From d270852ab71c8383474f5a7a62c7afa69845bd27 Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana at marvell.com>
Date: Thu, 11 Jun 2020 19:14:15 +0530
Subject: [PATCH] examples/fips_validation: fix TDES interim callback

[ upstream commit a18622864c8e9e7f7eea463db69ec3d4df00efdc ]

Fix missing callback registration and the incorrect
callback definition for interim NK_STR. The callback
should compare input key against the interim.

Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")

Signed-off-by: Archana Muniganti <marchana at marvell.com>
---
 .../fips_validation/fips_validation_tdes.c    | 25 ++++++++++---------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/examples/fips_validation/fips_validation_tdes.c b/examples/fips_validation/fips_validation_tdes.c
index 5b6737643..f4c738c78 100644
--- a/examples/fips_validation/fips_validation_tdes.c
+++ b/examples/fips_validation/fips_validation_tdes.c
@@ -59,9 +59,7 @@ static int
 parse_tdes_uint8_hex_str(const char *key, char *src, struct fips_val *val);
 
 static int
-parse_tdes_interim(const char *key,
-		__attribute__((__unused__)) char *text,
-		struct fips_val *val);
+parse_tdes_interim(const char *key, char *text, struct fips_val *val);
 
 struct fips_test_callback tdes_tests_vectors[] = {
 		{KEYS_STR, parse_tdes_uint8_hex_str, &vec.cipher_auth.key},
@@ -77,6 +75,7 @@ struct fips_test_callback tdes_tests_vectors[] = {
 struct fips_test_callback tdes_tests_interim_vectors[] = {
 		{ENC_STR, parse_tdes_interim, NULL},
 		{DEC_STR, parse_tdes_interim, NULL},
+		{NK_STR, parse_tdes_interim, NULL},
 		{NULL, NULL, NULL} /**< end pointer */
 };
 
@@ -94,21 +93,23 @@ struct fips_test_callback tdes_writeback_callbacks[] = {
 };
 
 static int
-parse_tdes_interim(const char *key,
-		__attribute__((__unused__)) char *text,
+parse_tdes_interim(const char *key, char *text,
 		__attribute__((__unused__)) struct fips_val *val)
 {
 	if (strstr(key, ENC_STR))
 		info.op = FIPS_TEST_ENC_AUTH_GEN;
 	else if (strstr(key, DEC_STR))
 		info.op = FIPS_TEST_DEC_AUTH_VERIF;
-	else if (strstr(NK_STR, "NumKeys = 1"))
-		info.interim_info.tdes_data.nb_keys = 1;
-	else if (strstr(NK_STR, "NumKeys = 2"))
-		info.interim_info.tdes_data.nb_keys = 2;
-	else if (strstr(NK_STR, "NumKeys = 3"))
-		info.interim_info.tdes_data.nb_keys = 3;
-	else
+	else if (strstr(key, NK_STR)) {
+		if (strcmp(text, "NumKeys = 1") == 0)
+			info.interim_info.tdes_data.nb_keys = 1;
+		else if (strcmp(text, "NumKeys = 2") == 0)
+			info.interim_info.tdes_data.nb_keys = 2;
+		else if (strcmp(text, "NumKeys = 3") == 0)
+			info.interim_info.tdes_data.nb_keys = 3;
+		else
+			return -EINVAL;
+	} else
 		return -EINVAL;
 
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.326981327 +0100
+++ 0149-examples-fips_validation-fix-TDES-interim-callback.patch	2020-07-24 12:53:48.511010633 +0100
@@ -1,14 +1,15 @@
-From a18622864c8e9e7f7eea463db69ec3d4df00efdc Mon Sep 17 00:00:00 2001
+From d270852ab71c8383474f5a7a62c7afa69845bd27 Mon Sep 17 00:00:00 2001
 From: Archana Muniganti <marchana at marvell.com>
 Date: Thu, 11 Jun 2020 19:14:15 +0530
 Subject: [PATCH] examples/fips_validation: fix TDES interim callback
 
+[ upstream commit a18622864c8e9e7f7eea463db69ec3d4df00efdc ]
+
 Fix missing callback registration and the incorrect
 callback definition for interim NK_STR. The callback
 should compare input key against the interim.
 
 Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")
-Cc: stable at dpdk.org
 
 Signed-off-by: Archana Muniganti <marchana at marvell.com>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 13 insertions(+), 12 deletions(-)
 
 diff --git a/examples/fips_validation/fips_validation_tdes.c b/examples/fips_validation/fips_validation_tdes.c
-index 84dd288e6..a1ddd57cf 100644
+index 5b6737643..f4c738c78 100644
 --- a/examples/fips_validation/fips_validation_tdes.c
 +++ b/examples/fips_validation/fips_validation_tdes.c
 @@ -59,9 +59,7 @@ static int
@@ -24,7 +25,7 @@
  
  static int
 -parse_tdes_interim(const char *key,
--		__rte_unused char *text,
+-		__attribute__((__unused__)) char *text,
 -		struct fips_val *val);
 +parse_tdes_interim(const char *key, char *text, struct fips_val *val);
  
@@ -43,9 +44,9 @@
  
  static int
 -parse_tdes_interim(const char *key,
--		__rte_unused char *text,
+-		__attribute__((__unused__)) char *text,
 +parse_tdes_interim(const char *key, char *text,
- 		__rte_unused struct fips_val *val)
+ 		__attribute__((__unused__)) struct fips_val *val)
  {
  	if (strstr(key, ENC_STR))
  		info.op = FIPS_TEST_ENC_AUTH_GEN;


More information about the stable mailing list