Message ID | 20200122105222.3758-1-ssardar@amd.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Delegated to: | akhil goyal |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 72A06A0530; Wed, 22 Jan 2020 11:52:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4AC632BF2; Wed, 22 Jan 2020 11:52:51 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750042.outbound.protection.outlook.com [40.107.75.42]) by dpdk.org (Postfix) with ESMTP id 2A8412BBE for <dev@dpdk.org>; Wed, 22 Jan 2020 11:52:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=digBmu537XrJyYZNjKj41T9ojp9dpZFpiyu+Bfze7QuDgjFXIBWK6z8ppSfSta46n/d0AooNRcVqmhtwKHygu3hS7mC/OWctvrErzppHAY5ZIR18hd17DWoUiZ33ia0dAMr3+iD8gXcY9NKN5QyGezGA7xYEIrBHcCaTz9EQRuMajQzJV6rCX26Mw8fxWG+wgC91KOHrpz9ybkKqFOqAr7jZHuif1u1FrVVT65JbzmRBNOeeiaEpbUOWFsDJoPnDUu3I6+vwH8SU7c2r63cJrUTA87073v3ihy/2earOiAXVmR5bOUwuB9w/1bREzaRb01S00G7Ad+1eTCPdlG3Dag== 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-SenderADCheck; bh=3veefuMoSwMK9izJv3MwW7NTonsxw9631hcKKPzrOFA=; b=CCnufVe0j7F5U0IStj0EA8n51vAB/EWdsN4+RfsnZt0V9BQif23IdWOXht+EwXGvuSU7JSfZzDMNpbwjAjCNyolO4I/R4T87DuPTlMB58SAYQVMVIrYvr+YhLFk7EuDIP/spAYyZxMnwDArgpkwsvcYMYB1fn5BtB5ToZTjWGFTg7p5XtlzEEEjBBHLbg/LjT2JONNJS9/KQ8VgoAVWUvr6Ynmg1WHIyuj0C4czUrtIselZJuXGadDBG9559WJ8LNebUOrZxxKxlaBSgpjkTVF022IM7/RHajYnIJkVgOqwFfQUskJEDgf51kXyQEAYpldspM+0YnYQ8Y2A167EGrQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3veefuMoSwMK9izJv3MwW7NTonsxw9631hcKKPzrOFA=; b=nepyKPBrdviH43sIy2jTFEkcsVcFcAXJ7DnXzP/xf1NTjYZR3ID5beSpc55ja/Wzrrlb0mTeDwV6W+XM3nbAzAvLgN0LGs91FKR79d+PoUmruKxj/ETE9xr+OMS0XF7EgTuhxf+eXhsM2+b6GIblJcHkqiAYw6MyJw2r06OkXbk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shamshersingh.Sardar@amd.com; Received: from MN2PR12MB3199.namprd12.prod.outlook.com (20.179.81.142) by MN2PR12MB2928.namprd12.prod.outlook.com (20.179.83.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Wed, 22 Jan 2020 10:52:44 +0000 Received: from MN2PR12MB3199.namprd12.prod.outlook.com ([fe80::f83b:4f68:bedb:4265]) by MN2PR12MB3199.namprd12.prod.outlook.com ([fe80::f83b:4f68:bedb:4265%7]) with mapi id 15.20.2644.027; Wed, 22 Jan 2020 10:52:44 +0000 From: ssardar@amd.com To: dev@dpdk.org Cc: Ravi1.Kumar@amd.com Date: Wed, 22 Jan 2020 16:22:21 +0530 Message-Id: <20200122105222.3758-1-ssardar@amd.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: MA1PR01CA0120.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:35::14) To MN2PR12MB3199.namprd12.prod.outlook.com (2603:10b6:208:ae::14) MIME-Version: 1.0 Received: from cae-Wallaby.amd.com (165.204.157.251) by MA1PR01CA0120.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:35::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19 via Frontend Transport; Wed, 22 Jan 2020 10:52:43 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [165.204.157.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 06b62332-77c9-496e-13a3-08d79f2935e0 X-MS-TrafficTypeDiagnostic: MN2PR12MB2928:|MN2PR12MB2928: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <MN2PR12MB292883B3568F273E075C04C1840C0@MN2PR12MB2928.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-Forefront-PRVS: 029097202E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(39860400002)(366004)(376002)(346002)(136003)(189003)(199004)(2616005)(956004)(66556008)(66476007)(1076003)(66946007)(316002)(6666004)(52116002)(7696005)(8676002)(6486002)(9686003)(4326008)(26005)(81156014)(16526019)(186003)(478600001)(81166006)(6916009)(8936002)(2906002)(36756003)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR12MB2928; H:MN2PR12MB3199.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YjAzfv2FR5Y3tNFwNHQ8EKcFScFtSj+5epnO7UoY73ih0tz1i4Xe5toBvVaJnxeIPzpQUmNdgESedKYIBum6x4bVm8EZ7t0kW1Uzm39yYnxXp0CS3KX1q6tvjEmzhRVmwQXe3+zOoFNHSoJMiuff8cvSVxlwUMlgnSyAFHwaGqblJyi+jKc6n/NJb0kjM8UCphcZTJm7tovd5M6z9NZEe2MmYDgVbiysbqiN456rz7emqH1IdW/++UjpYjf1CM+LDNkslvVRRpWo3GI4c6r3r9tWMcVF+/ACRx/spDyVRHEdZV18fUsZ0QExLcMDf+5XdJrLRGVr8rA3huH5PjLEKbP1QwAzycsVGM3lDZN47AfaiI9vphbtGOn7b7snUEDycQWQ1wPgrv/VCsKPw0KOSaalqUw74Kkeu6RQq4qNxn4gKoOvTVSvkhH1N6uuSfUa X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06b62332-77c9-496e-13a3-08d79f2935e0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2020 10:52:44.7095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ofoPkpYDSgqK8lW4lAtlwxUB2y/KMju28zWqY+RpzwBRnmw8dsFGPayAyToPugag X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB2928 Subject: [dpdk-dev] [PATCH v2 1/2] crypto/ccp: sha3 support enabling in ccp X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
[v2,1/2] crypto/ccp: sha3 support enabling in ccp
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | warning | coding style issues |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/iol-testing | success | Testing PASS |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/iol-nxp-Performance | success | Performance Testing PASS |
ci/Intel-compilation | success | Compilation OK |
Commit Message
ssardar@amd.com
Jan. 22, 2020, 10:52 a.m. UTC
From: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> sha3 support enabled in AMD-CCP crypto controller Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> --- lib/librte_cryptodev/rte_cryptodev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
Comments
[AMD Official Use Only - Internal Distribution Only] For series, Acked-by: Ravi Kumar <ravi1.kumar@amd.com> Regards, Ravi >-----Original Message----- >From: Sardar, Shamsher singh <Shamshersingh.Sardar@amd.com> >Sent: Wednesday, January 22, 2020 4:22 PM >To: dev@dpdk.org >Cc: Kumar, Ravi1 <Ravi1.Kumar@amd.com> >Subject: [PATCH v2 1/2] crypto/ccp: sha3 support enabling in ccp > >From: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > >sha3 support enabled in AMD-CCP crypto controller > >Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> >--- > lib/librte_cryptodev/rte_cryptodev.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c >index 5c6359b5c..6ee4f1086 100644 >--- a/lib/librte_cryptodev/rte_cryptodev.c >+++ b/lib/librte_cryptodev/rte_cryptodev.c >@@ -140,7 +140,16 @@ rte_crypto_auth_algorithm_strings[] = { > > [RTE_CRYPTO_AUTH_KASUMI_F9] = "kasumi-f9", > [RTE_CRYPTO_AUTH_SNOW3G_UIA2] = "snow3g-uia2", >- [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3" >+ [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3", >+ >+ [RTE_CRYPTO_AUTH_SHA3_224] = "sha3-224", >+ [RTE_CRYPTO_AUTH_SHA3_224_HMAC] = "sha3-224-hmac", >+ [RTE_CRYPTO_AUTH_SHA3_256] = "sha3-256", >+ [RTE_CRYPTO_AUTH_SHA3_256_HMAC] = "sha3-256-hmac", >+ [RTE_CRYPTO_AUTH_SHA3_384] = "sha3-384", >+ [RTE_CRYPTO_AUTH_SHA3_384_HMAC] = "sha3-384-hmac", >+ [RTE_CRYPTO_AUTH_SHA3_512] = "sha3-512", >+ [RTE_CRYPTO_AUTH_SHA3_512_HMAC] = "sha3-512-hmac" > }; > > /** >-- >2.17.1 >
> For series, > Acked-by: Ravi Kumar <ravi1.kumar@amd.com> > > > > >From: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > > > >sha3 support enabled in AMD-CCP crypto controller > > > >Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > >--- Change patch title and description as below cryptodev: fix missing SHA3 algo strings SHA3 support was added earlier but algo strings were missing. This patch add the missing strings. Fixes: 1df800f89518 ("crypto/ccp: support SHA3 family") Cc: stable@dpdk.org Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> Acked-by: Ravi Kumar <ravi1.kumar@amd.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Applied to dpdk-next-crypto Thanks.
05/02/2020 13:24, Akhil Goyal: > > For series, > > Acked-by: Ravi Kumar <ravi1.kumar@amd.com> > > > > > > > >From: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > > > > > >sha3 support enabled in AMD-CCP crypto controller > > > > > >Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > > >--- > Change patch title and description as below > cryptodev: fix missing SHA3 algo strings > > SHA3 support was added earlier but algo strings were > missing. This patch add the missing strings. > > Fixes: 1df800f89518 ("crypto/ccp: support SHA3 family") > Cc: stable@dpdk.org > > Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > Acked-by: Ravi Kumar <ravi1.kumar@amd.com> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com> > > Applied to dpdk-next-crypto Sorry I must drop this patch because it triggers an ABI warning: [C]'const char* rte_crypto_auth_algorithm_strings[]' was changed at rte_crypto_sym.h:320:1: size of symbol changed from 168 to 232 I don't understand how the size of this array can impact the application, but I prefer to stay on the safe side for now. Please let's discuss this patch in 20.02-rc3 timeframe.
On Wed, Feb 5, 2020 at 11:22 PM Thomas Monjalon <thomas@monjalon.net> wrote: > 05/02/2020 13:24, Akhil Goyal: > > > For series, > > > Acked-by: Ravi Kumar <ravi1.kumar@amd.com> > > > > > > > > > > >From: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > > > > > > > >sha3 support enabled in AMD-CCP crypto controller > > > > > > > >Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > > > >--- > > Change patch title and description as below > > cryptodev: fix missing SHA3 algo strings > > > > SHA3 support was added earlier but algo strings were > > missing. This patch add the missing strings. > > > > Fixes: 1df800f89518 ("crypto/ccp: support SHA3 family") > > Cc: stable@dpdk.org > > > > Signed-off-by: Sardar Shamsher Singh <Shamshersingh.Sardar@amd.com> > > Acked-by: Ravi Kumar <ravi1.kumar@amd.com> > > Acked-by: Akhil Goyal <akhil.goyal@nxp.com> > > > > Applied to dpdk-next-crypto > > Sorry I must drop this patch because it triggers an ABI warning: > [C]'const char* rte_crypto_auth_algorithm_strings[]' was changed at rte_crypto_sym.h:320:1: > size of symbol changed from 168 to 232 This is still not clear to me, but here is how I understand the issue. An exposed array (and its size) ends up in both the shared library and the final binary data section. [dmarchan@wsfd-netdev66 dpdk]$ readelf -sW ~/builds/build-gcc-shared/app/dpdk-test-crypto-perf |grep rte_crypto_auth_algorithm_strings 86: 00000000004141a0 168 OBJECT GLOBAL DEFAULT 24 rte_crypto_auth_algorithm_strings@DPDK_20.0 (4) 308: 00000000004141a0 168 OBJECT GLOBAL DEFAULT 24 rte_crypto_auth_algorithm_strings@@DPDK_20.0 [dmarchan@wsfd-netdev66 dpdk]$ readelf -sW ~/builds/build-gcc-shared/lib/librte_cryptodev.so |grep rte_crypto_auth_algorithm_strings 57: 000000000000b220 168 OBJECT GLOBAL DEFAULT 23 rte_crypto_auth_algorithm_strings@@DPDK_20.0 158: 000000000000b220 168 OBJECT GLOBAL DEFAULT 23 rte_crypto_auth_algorithm_strings At runtime, the linker chooses to rewire all access to the final binary data section, not the shared library local representation. Now, if we update the array size, the shared library code is built with the assumption of the increased size. But at runtime with an "old" binary, the shared library code runs with a shorter array, with potential out of bound access. Interesting article: https://developers.redhat.com/blog/2019/05/06/how-c-array-sizes-become-part-of-the-binary-interface-of-a-library/
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 5c6359b5c..6ee4f1086 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -140,7 +140,16 @@ rte_crypto_auth_algorithm_strings[] = { [RTE_CRYPTO_AUTH_KASUMI_F9] = "kasumi-f9", [RTE_CRYPTO_AUTH_SNOW3G_UIA2] = "snow3g-uia2", - [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3" + [RTE_CRYPTO_AUTH_ZUC_EIA3] = "zuc-eia3", + + [RTE_CRYPTO_AUTH_SHA3_224] = "sha3-224", + [RTE_CRYPTO_AUTH_SHA3_224_HMAC] = "sha3-224-hmac", + [RTE_CRYPTO_AUTH_SHA3_256] = "sha3-256", + [RTE_CRYPTO_AUTH_SHA3_256_HMAC] = "sha3-256-hmac", + [RTE_CRYPTO_AUTH_SHA3_384] = "sha3-384", + [RTE_CRYPTO_AUTH_SHA3_384_HMAC] = "sha3-384-hmac", + [RTE_CRYPTO_AUTH_SHA3_512] = "sha3-512", + [RTE_CRYPTO_AUTH_SHA3_512_HMAC] = "sha3-512-hmac" }; /**