From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 061F3A04AF for ; Thu, 20 Aug 2020 17:35:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F26661E2B; Thu, 20 Aug 2020 17:35:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 3CE841E2B for ; Thu, 20 Aug 2020 17:35:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597937705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YUt2NLfD44IdLmiOGMScYIIvW6hFhGvQQY8Yb9AcJU8=; b=doYzOHRc8ItmhbTMyPyxp4qsg1BYGu+uRAWTQ/Kc6OipulnfkqHwVY4WnotIODf/ezlBbu yCRoKxmE4i6kDuvgCoVtcjlRz1pbAPnrn6BgclRPWhqCcgAD+tVdO586jx5B0eTVqQ60/V sCyKyUucx6hCJXu0AbGvBa1jFwtOpQg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-fnfwhXGnNByrVHJR3S-BQw-1; Thu, 20 Aug 2020 11:35:02 -0400 X-MC-Unique: fnfwhXGnNByrVHJR3S-BQw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 096091007477; Thu, 20 Aug 2020 15:35:01 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8953100EBA7; Thu, 20 Aug 2020 15:34:59 +0000 (UTC) From: Kevin Traynor To: Ayuj Verma Cc: Archana Muniganti , dpdk stable Date: Thu, 20 Aug 2020 16:33:40 +0100 Message-Id: <20200820153341.171927-35-ktraynor@redhat.com> In-Reply-To: <20200820153341.171927-1-ktraynor@redhat.com> References: <20200820153341.171927-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/fips_validation: fix parsing of TDES vectors' has been queued to LTS release 18.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.10 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/25/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. 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/7071c6483383b50bdf795de442635b7e4c94a2ac Thanks. Kevin. --- >From 7071c6483383b50bdf795de442635b7e4c94a2ac Mon Sep 17 00:00:00 2001 From: Ayuj Verma Date: Thu, 11 Jun 2020 19:14:16 +0530 Subject: [PATCH] examples/fips_validation: fix parsing of TDES vectors [ upstream commit 32440cdf2af9ad38fd32a533f51a32da92345007 ] Processing of test vector for COUNT = 0 is getting skipped, as some of the NIST TDES files doesn't have an empty line after [ENCRYPT]/[DECRYPT] and thus treated as an interim block. Parse function now identifies such blocks, separates out interim and test vector data, and then parses each with their respective callbacks. Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application") Signed-off-by: Archana Muniganti Signed-off-by: Ayuj Verma --- examples/fips_validation/fips_validation.c | 21 +++++++++++++++------ examples/fips_validation/fips_validation.h | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index a835cc3fa6..6d14fe8ed4 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -289,9 +289,11 @@ fips_test_parse_one_case(void) { uint32_t i, j = 0; - uint32_t is_interim = 0; + uint32_t is_interim; + uint32_t interim_cnt = 0; int ret; if (info.interim_callbacks) { for (i = 0; i < info.nb_vec_lines; i++) { + is_interim = 0; for (j = 0; info.interim_callbacks[j].key != NULL; j++) if (strstr(info.vec[i], @@ -306,15 +308,22 @@ fips_test_parse_one_case(void) return ret; } + + if (is_interim) + interim_cnt += 1; } } - if (is_interim) { - for (i = 0; i < info.nb_vec_lines; i++) + info.vec_start_off = interim_cnt; + + if (interim_cnt) { + for (i = 0; i < interim_cnt; i++) fprintf(info.fp_wr, "%s\n", info.vec[i]); fprintf(info.fp_wr, "\n"); - return 1; + + if (info.nb_vec_lines == interim_cnt) + return 1; } - for (i = 0; i < info.nb_vec_lines; i++) { + for (i = info.vec_start_off; i < info.nb_vec_lines; i++) { for (j = 0; info.callbacks[j].key != NULL; j++) if (strstr(info.vec[i], info.callbacks[j].key)) { @@ -336,5 +345,5 @@ fips_test_write_one_case(void) uint32_t i; - for (i = 0; i < info.nb_vec_lines; i++) + for (i = info.vec_start_off; i < info.nb_vec_lines; i++) fprintf(info.fp_wr, "%s\n", info.vec[i]); } diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h index 3e291bc365..80ead1cf07 100644 --- a/examples/fips_validation/fips_validation.h +++ b/examples/fips_validation/fips_validation.h @@ -143,4 +143,5 @@ struct fips_test_interim_info { char *one_line_text; char *vec[MAX_LINE_PER_VECTOR]; + uint32_t vec_start_off; uint32_t nb_vec_lines; char device_name[MAX_STRING_SIZE]; -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-20 16:26:17.045556209 +0100 +++ 0035-examples-fips_validation-fix-parsing-of-TDES-vectors.patch 2020-08-20 16:26:15.831324387 +0100 @@ -1 +1 @@ -From 32440cdf2af9ad38fd32a533f51a32da92345007 Mon Sep 17 00:00:00 2001 +From 7071c6483383b50bdf795de442635b7e4c94a2ac Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 32440cdf2af9ad38fd32a533f51a32da92345007 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index a34e34d25a..3aaec20fb4 100644 +index a835cc3fa6..6d14fe8ed4 100644 @@ -28 +29 @@ -@@ -341,9 +341,11 @@ fips_test_parse_one_case(void) +@@ -289,9 +289,11 @@ fips_test_parse_one_case(void) @@ -41 +42 @@ -@@ -358,15 +360,22 @@ fips_test_parse_one_case(void) +@@ -306,15 +308,22 @@ fips_test_parse_one_case(void) @@ -68 +69 @@ -@@ -388,5 +397,5 @@ fips_test_write_one_case(void) +@@ -336,5 +345,5 @@ fips_test_write_one_case(void) @@ -76 +77 @@ -index 5aee955c16..75fa555fa6 100644 +index 3e291bc365..80ead1cf07 100644 @@ -79 +80 @@ -@@ -162,4 +162,5 @@ struct fips_test_interim_info { +@@ -143,4 +143,5 @@ struct fips_test_interim_info {