From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 983BA42833; Fri, 24 Mar 2023 16:01:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42A85406B8; Fri, 24 Mar 2023 16:01:35 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 2A26F4021F for ; Fri, 24 Mar 2023 16:01:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679670093; x=1711206093; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=HDUyB0+oCqa1MICjS+YMgL8eoJEw1lAhKfXCt0IHY8A=; b=JVrap0adpHHAjTEtGW2l/yrV2mNxw8oBng5dMlj9d7qz9m77CksVAZMv TOsl4xErSr+jxqpwzPFTXifb8aeiHPWA1cxhQmqXDNHmxa8jv/hkrdZqe a8h50vLhrtA5CAVqmbiZT3iiIvwfp49krVSiiuM+OxVGBTopTl43m5Bcv Xg9JN/ec8dFCd4TCmxcD0SIPVlKdckyFIj73WBvwV+VaFkXBPcYzpT3a+ z0XpzO//jYFLRc3GAUfMYBrXYNDtqeeVMpgE8hzifraRiEZigslcqt+nW HhPG/TiIe1sW9gTYli0vGEDcpgsns49Aty7VLPO1Cl1IG5zbJxrDCU3sn Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10659"; a="404714269" X-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208";a="404714269" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2023 08:01:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10659"; a="751931824" X-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208";a="751931824" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga004.fm.intel.com with ESMTP; 24 Mar 2023 08:01:28 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 24 Mar 2023 08:01:27 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Fri, 24 Mar 2023 08:01:27 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Fri, 24 Mar 2023 08:01:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=agAwtukYNdQ+AcXEsxyh4Uofy3j0i3GSwQSPQt6NeuEhx2o0R+c3ILh/CgVaCMOEmcCsWV6aLWSw1teeU5U18JaXawFRe74lA9ftKIi8TmVMkuhpgeOI00fBZ+D29NIN3R0Fzt5VH1GQKW+2n3WiM7aAQ6x8V6MJ62nfwMYURsUIZOh/zQ378+9gI4bXUykF6jjEWw2/JR0aUuMoJdB7wiWQuT/ZBYEbP+Tgvi6iSakd9nxrpHZNdh5OODk9vm/vQXPlz8qjOkc9E5pf/+x9E5ODBHT7ByeH4Cov95NLX6kQHOiyxvCW/Jb+BwbhpihrhwENhg7Fku0OKrXim1KlOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DUsZxHLpPSbOwvzpGsKW7DxQA9kESCFJD4kvbHBnUew=; b=ZKOdKwnCvCv15UvKIiBiWjftO7HmABS7cXja671NquHmNTobB+h261zqSKDQ3iAAJRuUoLKzCbWix8oJxgDTVLMUgRsSf6OkDfGZcwk4s1J9s9lxKI+BXjkCwliZ+1JsX5shNmcXqLaxO++WKCC5fBtA/u5AlHavNsoGb7F/c5eMfQKGz9nab7JdE/E4jRxnXJzuwWCG10vfY+CKe88Zmna67R+RJn8eGMxQkVTYLkd3QYAbBIcb81UoFqarDFpgGOY/m63qSxx4/bijqD0OEweAfUTLfT2d87YlmrFwcNi9GsSrbGDrR55WOY9561SUyiwpQabuGdWfXHQp4oZ+Nw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from CY4PR11MB1848.namprd11.prod.outlook.com (2603:10b6:903:123::22) by SA1PR11MB6990.namprd11.prod.outlook.com (2603:10b6:806:2b9::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Fri, 24 Mar 2023 15:01:25 +0000 Received: from CY4PR11MB1848.namprd11.prod.outlook.com ([fe80::d7e8:ae76:5214:c0c6]) by CY4PR11MB1848.namprd11.prod.outlook.com ([fe80::d7e8:ae76:5214:c0c6%10]) with mapi id 15.20.6178.039; Fri, 24 Mar 2023 15:01:25 +0000 From: "Dooley, Brian" To: Gowrishankar Muthukrishnan , "dev@dpdk.org" CC: "jerinj@marvell.com" , "anoobj@marvell.com" , Akhil Goyal Subject: RE: [PATCH] examples/fips_validation: fix digest in non JSON SHA MCT Thread-Topic: [PATCH] examples/fips_validation: fix digest in non JSON SHA MCT Thread-Index: AQHZXi91p8QWotM4vkqMPG/dYlksRa8KBh5A Date: Fri, 24 Mar 2023 15:01:25 +0000 Message-ID: References: <20230324090200.426613-1-gmuthukrishn@marvell.com> In-Reply-To: <20230324090200.426613-1-gmuthukrishn@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY4PR11MB1848:EE_|SA1PR11MB6990:EE_ x-ms-office365-filtering-correlation-id: 392855fb-1f94-4989-9827-08db2c78a37f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AkNzoeOYoHXe9ngTJ3+LwEF2HAjkUHy8jCVPrdfOWqtbVndBIypRaoqce1zlydR7JIvDbRHpGRCzODMijipGr1F61gLraoiuxMOP5bCee/vvIzW3qnHVc8g6P+ZT4JjXxgExJWSO1uwNFJ5SEZBWpjbnKcn/IYmIRrC/os3EBgrXSjOtWyPEISBb9TpmLpk6bxQKMtqEFcyOZbMBa77r7CRTXBD1g7TWQnn2Sta04Asp29yP4xnfBJiyf9wdx+H7CRdekQ66Bo6K+A+2QFKjW6IL49kuoqK8vMe6dS4p1BTFgWUui+wifXv8/yPXo8y9KiwXJoQDb5JzZlJCoaxcGWpo4MDGmdC9l/CwtiAMIiItU2jDLDkNAdiCwo5E9VREjl1orse+kmwm6w5poVzzvxPfLBezQGR1FQrCXi7LIMQYLi1FyCG6y1/JVcXU4D7kGrCU4LmPruFmZlvfvgf/QS3m1ohK9GNjbi9DzrMSoH2Zx4FmnovzcMnhDKaPLiX3VzZylM4eQHfuTCYjGh5gk9PYSnuMaWzNdfu+mvIShdKnuMI8p8N46pVbxFZPU8fun+5kElFPGDhg1BAhnYR8y1DXaE90Bo/zHh1z1BX1DU1MhTX7Tci+FC0dbOsBJUz/ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR11MB1848.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(346002)(396003)(366004)(376002)(39860400002)(136003)(451199018)(38100700002)(66556008)(64756008)(66476007)(4326008)(76116006)(66446008)(52536014)(66946007)(8676002)(8936002)(33656002)(41300700001)(122000001)(53546011)(83380400001)(186003)(71200400001)(86362001)(55016003)(38070700005)(9686003)(6506007)(26005)(110136005)(54906003)(316002)(7696005)(478600001)(82960400001)(5660300002)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lxG8Ep41qCpkuviusDANiF4Xc1D8OyvLffIZsOuOREt5+Y9igg4Ibt4JRV4V?= =?us-ascii?Q?sPRanRVqGzPHn0cceXL0GeQlHoASe6N8DjjLxKnzZ9ECL9A/VNUjKd5tq/+q?= =?us-ascii?Q?b2Z0YE+DSJDWIRvFqzPI4oE9eHLkTOJbMGsjtTMwjis4uDWDK4EEFfa/OZAq?= =?us-ascii?Q?egS6Kd1ClRhuaW0SeZtrO/LrWzPe2/joLdQTin5rFjaWJdrqhV/IP2PxTCQ0?= =?us-ascii?Q?cgItZLPvdLkH9UxdRWqlQiA/jiJcSVuDKk3D1Bu9BjB2IZb+euMZK6lov8BK?= =?us-ascii?Q?VMcy5tFvwCJtHKyKszGHdjVsa3/CoAxt/l0Z29fLsPIVSnmNnhjWs/2K1uMI?= =?us-ascii?Q?zhHcIcwUNBoBoS+uKVz4sG8uokh05dbExTANgYqzALp3Bva0Y4g+AIiq52D5?= =?us-ascii?Q?TS2FzN+Fj3tnGq4FwYDmXXIcb2E2LHsIeHCWxSFI3ifVGHjajw0GmomdRyDU?= =?us-ascii?Q?5D1RYw47tc8GWsoT6r7M2+Ju3WZhAr1Bh2vetcxQJo6DQP9QBNhmDmLieqWa?= =?us-ascii?Q?7j5hSgeVNkBU9BxHvTso17HpI4LY3g8oUtypHa+PvGKUu5vmLopdICFFYGrT?= =?us-ascii?Q?YaqKsYC/0oYgsun6DtRZv6u8JaRj+XaFAvUkA3dasxAJ9974zYhA7OtY0xzI?= =?us-ascii?Q?nLt3bUKOF9DW6VsBgcscrZZyeLeuSLfDie6M8RBybNutSbsbL7DFjn7Cnml1?= =?us-ascii?Q?s+Np+1ZZ1vW5bXEOBUv7SS1qcyuV6zKHnKBp7c7sL+jeiLRJb46S84F9Hhkt?= =?us-ascii?Q?f5bJa1W+K+nKdpMIxwo2Q/vipYQNGUN3S4rn6IyZMjE5f5OPSTc2i4GY6Skx?= =?us-ascii?Q?tD3RaykULJvu7SnYErkF0VqLU+orwRhs5yQ+5+l2q1GjVfNO7THTlKAFoBYM?= =?us-ascii?Q?u0xYcsdzFUKmmUdsea1oKf7a4YbsEjoJ2wz47fpzciNkuKvZh4ofxFuPKd0L?= =?us-ascii?Q?magYvpG897lOd6rGpHyCnVAvono9Di9IrK/F2dgtltTtaO6gKHZiVIQ/rKFD?= =?us-ascii?Q?eYorWYw+XwikyMMTMmlCDfVDpCeOg/Oi3FcY2feHdg2eXslsOjh00kdETbJM?= =?us-ascii?Q?IsTp3AXcO1ylAJfyJZNjHtN1U7Cy+UC1RXYQGmBmdDkjfr4b+WQfq2G6CC3m?= =?us-ascii?Q?WhISsgsP7sITpqHg4GE17qnN+p8BbxsTBgQXD3kp4z+R8kukjr2dKomwa9Bt?= =?us-ascii?Q?XbrDTYyjKScPrUE/6a6qdVYSDpb+UCIt8oXpRcljdmS4nePwdMGupPph81vx?= =?us-ascii?Q?l3bJ4k6+z52m5ECYnUqu4Pv2uoZjXk3awKwwX0uCe/MCNBvzm3g/JeqL85dA?= =?us-ascii?Q?mK0F1ZY2RmXEz+tnWbSOsUn7xgPRY2FKlSY7jvQXu0Y6O5g+Sa7V+hbt9oMN?= =?us-ascii?Q?2tZ00TLI6DpF40jkR59EciR5cGkC+tBWdllFXKUbVtSwJOVpT6J/twCULeoV?= =?us-ascii?Q?9Y2iA7GrnV982fb/A9+nrMPuaY4ebBmJzGmxJ3qkQ5tBa9GerIUlGOj3UUX5?= =?us-ascii?Q?VOfwigXmVO4Lmr4KtxBG+U4gvV9F24xVWcGgVoh11FklSzXYE53fPKFnbfUI?= =?us-ascii?Q?l+9RS9JCqJFdKf07iZwYGIM0CO1+CD8bEBgiHoK9?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1848.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 392855fb-1f94-4989-9827-08db2c78a37f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2023 15:01:25.3334 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +jf2+g4fpsMp2sUixyhCvgCnFMN1li5HTrP5tUWRL5uLBw6XNEBhDiZ9qcuNOVRxyZhfBS/vGHwv7QNZaWH/9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6990 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Gowrishankar, > -----Original Message----- > From: Gowrishankar Muthukrishnan > Sent: Friday 24 March 2023 09:02 > To: dev@dpdk.org > Cc: jerinj@marvell.com; anoobj@marvell.com; Akhil Goyal > ; Dooley, Brian ; > Gowrishankar Muthukrishnan > Subject: [PATCH] examples/fips_validation: fix digest in non JSON SHA MCT >=20 > Non JSON SHA MCT tests produce incorrect digest due to a regression while > handling MD blocks in common for all kind of SHA, SHA2, SHA3 and SHAKE > algorithms. Fixing this along with some cleanup to use only rte_malloc AP= I for > storing test vectors as in other tests. >=20 > Fixes: d8417b5ef4e ("examples/fips_validation: add SHA3 validation") >=20 > Signed-off-by: Gowrishankar Muthukrishnan > --- > .../fips_validation/fips_validation_sha.c | 31 ++++++----- > examples/fips_validation/main.c | 53 +++++++++---------- > 2 files changed, 42 insertions(+), 42 deletions(-) >=20 > diff --git a/examples/fips_validation/fips_validation_sha.c > b/examples/fips_validation/fips_validation_sha.c > index 7ce7d3744f..e81bfeceda 100644 > --- a/examples/fips_validation/fips_validation_sha.c > +++ b/examples/fips_validation/fips_validation_sha.c > @@ -7,6 +7,7 @@ > #include > #include >=20 > +#include > #include >=20 > #include "fips_validation.h" > @@ -28,19 +29,20 @@ >=20 > struct plain_hash_size_conversion { > const char *str; > + uint8_t md_blocks; > enum rte_crypto_auth_algorithm algo; > } phsc[] =3D { > - {"20", RTE_CRYPTO_AUTH_SHA1}, > - {"28", RTE_CRYPTO_AUTH_SHA224}, > - {"32", RTE_CRYPTO_AUTH_SHA256}, > - {"48", RTE_CRYPTO_AUTH_SHA384}, > - {"64", RTE_CRYPTO_AUTH_SHA512}, > - {"28", RTE_CRYPTO_AUTH_SHA3_224}, > - {"32", RTE_CRYPTO_AUTH_SHA3_256}, > - {"48", RTE_CRYPTO_AUTH_SHA3_384}, > - {"64", RTE_CRYPTO_AUTH_SHA3_512}, > - {"16", RTE_CRYPTO_AUTH_SHAKE_128}, > - {"32", RTE_CRYPTO_AUTH_SHAKE_256}, > + {"20", 3, RTE_CRYPTO_AUTH_SHA1}, > + {"28", 3, RTE_CRYPTO_AUTH_SHA224}, > + {"32", 3, RTE_CRYPTO_AUTH_SHA256}, > + {"48", 3, RTE_CRYPTO_AUTH_SHA384}, > + {"64", 3, RTE_CRYPTO_AUTH_SHA512}, > + {"28", 1, RTE_CRYPTO_AUTH_SHA3_224}, > + {"32", 1, RTE_CRYPTO_AUTH_SHA3_256}, > + {"48", 1, RTE_CRYPTO_AUTH_SHA3_384}, > + {"64", 1, RTE_CRYPTO_AUTH_SHA3_512}, > + {"16", 1, RTE_CRYPTO_AUTH_SHAKE_128}, > + {"32", 1, RTE_CRYPTO_AUTH_SHAKE_256}, > }; >=20 > int > @@ -69,6 +71,7 @@ parse_interim_algo(__rte_unused const char *key, > for (i =3D 0; i < RTE_DIM(phsc); i++) { > if (strstr(text, phsc[i].str)) { > info.interim_info.sha_data.algo =3D phsc[i].algo; > + info.interim_info.sha_data.md_blocks =3D > phsc[i].md_blocks; > parser_read_uint32_val(ALGO_PREFIX, > text, &vec.cipher_auth.digest); > break; > @@ -84,7 +87,7 @@ parse_interim_algo(__rte_unused const char *key, > struct fips_test_callback sha_tests_vectors[] =3D { > {MSGLEN_STR, parser_read_uint32_bit_val, &vec.pt}, > {MSG_STR, parse_uint8_known_len_hex_str, &vec.pt}, > - {SEED_STR, parse_uint8_hex_str, &vec.cipher_auth.digest}, > + {SEED_STR, parse_uint8_hex_str, &vec.pt}, > {NULL, NULL, NULL} /**< end pointer */ }; >=20 > @@ -307,8 +310,8 @@ parse_test_sha_json_algorithm(void) > if (sz < 0) > return -1; >=20 > - free(vec.cipher_auth.digest.val); > - vec.cipher_auth.digest.val =3D calloc(1, sz); > + rte_free(vec.cipher_auth.digest.val); > + vec.cipher_auth.digest.val =3D rte_malloc(NULL, sz, 0); > if (vec.cipher_auth.digest.val =3D=3D NULL) > return -1; >=20 > diff --git a/examples/fips_validation/main.c > b/examples/fips_validation/main.c index 4c231fdb29..4237224d9d 100644 > --- a/examples/fips_validation/main.c > +++ b/examples/fips_validation/main.c > @@ -1618,11 +1618,11 @@ get_writeback_data(struct fips_val *val) >=20 > /* in case val is reused for MCT test, try to free the buffer first */ > if (val->val) { > - free(val->val); > + rte_free(val->val); > val->val =3D NULL; > } >=20 > - wb_data =3D dst =3D calloc(1, total_len); > + wb_data =3D dst =3D rte_malloc(NULL, total_len, 0); > if (!dst) { > RTE_LOG(ERR, USER1, "Error %i: Not enough memory\n", - > ENOMEM); > return -ENOMEM; > @@ -1640,7 +1640,7 @@ get_writeback_data(struct fips_val *val) >=20 > if (data_len) { > RTE_LOG(ERR, USER1, "Error -1: write back data\n"); > - free(wb_data); > + rte_free(wb_data); > return -1; > } >=20 > @@ -1863,7 +1863,7 @@ fips_generic_test(void) >=20 > if (info.file_type !=3D FIPS_TYPE_JSON) > fprintf(info.fp_wr, "\n"); > - free(val.val); > + rte_free(val.val); >=20 > return 0; > } > @@ -1883,11 +1883,11 @@ fips_mct_tdes_test(void) > int test_mode =3D info.interim_info.tdes_data.test_mode; >=20 > pt.len =3D vec.pt.len; > - pt.val =3D calloc(1, pt.len); > + pt.val =3D rte_malloc(NULL, pt.len, 0); > ct.len =3D vec.ct.len; > - ct.val =3D calloc(1, ct.len); > + ct.val =3D rte_malloc(NULL, ct.len, 0); > iv.len =3D vec.iv.len; > - iv.val =3D calloc(1, iv.len); > + iv.val =3D rte_malloc(NULL, iv.len, 0); >=20 > for (i =3D 0; i < TDES_EXTERN_ITER; i++) { > if (info.file_type !=3D FIPS_TYPE_JSON) { @@ -2055,10 +2055,10 > @@ fips_mct_tdes_test(void) > } > } >=20 > - free(val[0].val); > - free(pt.val); > - free(ct.val); > - free(iv.val); > + rte_free(val[0].val); > + rte_free(pt.val); > + rte_free(ct.val); > + rte_free(iv.val); >=20 > return 0; > } > @@ -2140,7 +2140,7 @@ fips_mct_aes_ecb_test(void) > } > } >=20 > - free(val.val); > + rte_free(val.val); >=20 > return 0; > } > @@ -2160,11 +2160,11 @@ fips_mct_aes_test(void) > return fips_mct_aes_ecb_test(); >=20 > pt.len =3D vec.pt.len; > - pt.val =3D calloc(1, pt.len); > + pt.val =3D rte_malloc(NULL, pt.len, 0); > ct.len =3D vec.ct.len; > - ct.val =3D calloc(1, ct.len); > + ct.val =3D rte_malloc(NULL, ct.len, 0); > iv.len =3D vec.iv.len; > - iv.val =3D calloc(1, iv.len); > + iv.val =3D rte_malloc(NULL, iv.len, 0); > for (i =3D 0; i < AES_EXTERN_ITER; i++) { > if (info.file_type !=3D FIPS_TYPE_JSON) { > if (i !=3D 0) > @@ -2267,10 +2267,10 @@ fips_mct_aes_test(void) > memcpy(vec.iv.val, val[0].val, AES_BLOCK_SIZE); > } >=20 > - free(val[0].val); > - free(pt.val); > - free(ct.val); > - free(iv.val); > + rte_free(val[0].val); > + rte_free(pt.val); > + rte_free(ct.val); > + rte_free(iv.val); >=20 > return 0; > } > @@ -2288,9 +2288,8 @@ fips_mct_sha_test(void) >=20 > max_outlen =3D md_blocks * vec.cipher_auth.digest.len; >=20 > - free(vec.cipher_auth.digest.val); > - > - vec.cipher_auth.digest.val =3D calloc(1, max_outlen); > + rte_free(vec.cipher_auth.digest.val); > + vec.cipher_auth.digest.val =3D rte_malloc(NULL, max_outlen, 0); >=20 > if (vec.pt.val) > memcpy(vec.cipher_auth.digest.val, vec.pt.val, > vec.cipher_auth.digest.len); @@ -2364,7 +2363,7 @@ > fips_mct_sha_test(void) >=20 > rte_free(vec.pt.val); >=20 > - free(val.val); > + rte_free(val.val); > return 0; > } >=20 > @@ -2381,9 +2380,8 @@ fips_mct_shake_test(void) >=20 > max_outlen =3D vec.cipher_auth.digest.len; >=20 > - free(vec.cipher_auth.digest.val); > - > - vec.cipher_auth.digest.val =3D calloc(1, max_outlen); > + rte_free(vec.cipher_auth.digest.val); > + vec.cipher_auth.digest.val =3D rte_malloc(NULL, max_outlen, 0); >=20 > if (vec.pt.val) > memcpy(vec.cipher_auth.digest.val, vec.pt.val, vec.pt.len); > @@ -2452,8 +2450,7 @@ fips_mct_shake_test(void) >=20 > rte_free(md.val); > rte_free(vec.pt.val); > - > - free(val.val); > + rte_free(val.val); > return 0; > } >=20 > -- > 2.25.1 Tested-by: Brian Dooley