patch 'test/crypto: fix modex comparison' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:49:49 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b2acb5218f3a79b0fd68593c08ceb308c199e94b
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From b2acb5218f3a79b0fd68593c08ceb308c199e94b Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Date: Mon, 15 Jul 2024 19:08:33 +0530
Subject: [PATCH] test/crypto: fix modex comparison
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit cc42abd111e09672edb51e786baa7e49263c5c0a ]
Fix comparison function used by modex test to check from
first non-zero value itself.
Coverity issue: 430125
Fixes: 2162d32c1c3b ("test/crypto: validate modex from first non-zero")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Acked-by: Anoob Joseph <anoobj at marvell.com>
---
app/test/test_cryptodev_asym.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index a6bb1e03f3..3b57a0249b 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -3197,21 +3197,26 @@ static int send_one(void)
}
static int
-modular_cmpeq(const uint8_t *a, const uint8_t *b, size_t len)
+modular_cmpeq(const uint8_t *a, size_t a_len, const uint8_t *b, size_t b_len)
{
- const uint8_t *new_a = a, *new_b = b;
+ const uint8_t *new_a, *new_b;
size_t i, j;
/* Strip leading NUL bytes */
- for (i = 0; i < len; i++)
+ for (i = 0; i < a_len; i++)
if (a[i] != 0)
- new_a = &a[i];
+ break;
- for (j = 0; j < len; j++)
+ for (j = 0; j < b_len; j++)
if (b[j] != 0)
- new_b = &b[i];
+ break;
+
+ if (a_len - i != b_len - j)
+ return 1;
- if (i != j || memcmp(new_a, new_b, len - i))
+ new_a = &a[i];
+ new_b = &b[j];
+ if (memcmp(new_a, new_b, a_len - i))
return 1;
return 0;
@@ -3251,7 +3256,7 @@ modular_exponentiation(const void *test_data)
TEST_ASSERT_SUCCESS(send_one(),
"Failed to process crypto op");
- TEST_ASSERT_SUCCESS(modular_cmpeq(vector->reminder.data,
+ TEST_ASSERT_SUCCESS(modular_cmpeq(vector->reminder.data, vector->reminder.len,
self->result_op->asym->modex.result.data,
self->result_op->asym->modex.result.length),
"operation verification failed\n");
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:06.086771915 +0800
+++ 0112-test-crypto-fix-modex-comparison.patch 2024-08-12 20:44:02.445069363 +0800
@@ -1 +1 @@
-From cc42abd111e09672edb51e786baa7e49263c5c0a Mon Sep 17 00:00:00 2001
+From b2acb5218f3a79b0fd68593c08ceb308c199e94b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit cc42abd111e09672edb51e786baa7e49263c5c0a ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 1d88832146..f0b5d38543 100644
+index a6bb1e03f3..3b57a0249b 100644
More information about the stable
mailing list