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 86C96A0518 for ; Fri, 24 Jul 2020 14:10:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FA601C039; Fri, 24 Jul 2020 14:10:17 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id B0B621C215 for ; Fri, 24 Jul 2020 14:10:15 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id f18so8067702wml.3 for ; Fri, 24 Jul 2020 05:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TlJXiuj5D7LQ6P5YEmDpvz8DJeNSzPVvRblgdDpOG8U=; b=kcY3nFQNaisGQjoWJaFqNPDKJ+AoL8V3+hn/mB51yMc5BzIEr7hhAYWXiiV3XUfkTP 5j05IP9I22459VEKa1IJR24VsfglZ9W9P2csg06QyVhEYHUk5eu2ONbcsdOgttU+CG64 3J3YnWOUgApzfwYTxetCUB3fJpJA5xecJyHiZJoNUHjOz3q/BYpte2xU4Rluz8I851VC 9oeXNLlRhG/I8QoPshw7feDHXTYG7t5J8xFyCPQ+dmcWMPV5O3jF4mbvDZ2nuMaAgfjq /HmgRgLXVR3T/X+6I7BKvQBW8DsQbCZnex8G9739dRMGpPf7TNW8VLjma5GAV+2xW+nw sz1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TlJXiuj5D7LQ6P5YEmDpvz8DJeNSzPVvRblgdDpOG8U=; b=XgdfDxOSbpOKnyUvMGt+Gdr2dBrRfmZLOKbkT+iDoAusMaE2MhsWt2nGnqKZyOLcpn EtbnqPckoUS3xJ0kzs2vnAU6s19fRPpKj+anaBzr3eXcPljyzq23Ww/CwP8+PPdxtdxh 21XvNDVgsgI3dH+VAV6kVCUctq9pjpOyVe20R3flRRJEmWmcLJn6cOAeCJhGvNU7AJ9W raQvjKSrf249JTb7DmEjIp3jD5MvOrBC+bLyKvTMRIKjT+QK2PEhOHem8YZDL3LRqKrB 4tHy/yNlmhmpfAEg7y6tBfxNqSdRofmeWWTa1cnugyIOIJ/s/Xu7iHqasqeoaaQUoPnz VPwQ== X-Gm-Message-State: AOAM530xM7C1wmbEbKMW0ZHhCCnSyivXvOX6JMjg+va3LoH9GsaCFvPW gm1XH7MPdC/Dmu2ZmAQR6nVb0HaASvXCRw== X-Google-Smtp-Source: ABdhPJwI71C1qBdWM6eLefwmjo6ALcQtZM/KM21eXzADmxFr+R3HuPXpCz+l9QCaOxFk5Dbi7r8j4Q== X-Received: by 2002:a7b:c5d8:: with SMTP id n24mr8651097wmk.153.1595592615472; Fri, 24 Jul 2020 05:10:15 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id l67sm7873282wml.13.2020.07.24.05.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:10:14 -0700 (PDT) From: luca.boccassi@gmail.com To: Archana Muniganti Cc: dpdk stable Date: Fri, 24 Jul 2020 12:59:47 +0100 Message-Id: <20200724120030.1863487-149-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/fips_validation: fix TDES interim callback' has been queued to stable release 19.11.4 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 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 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 --- .../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 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@dpdk.org Signed-off-by: Archana Muniganti --- @@ -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;