Message ID | 1434412379-11623-9-git-send-email-vicki.milhoan@freescale.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show
Return-Path: <linux-crypto-owner@kernel.org> X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DDC889F1C1 for <patchwork-linux-crypto@patchwork.kernel.org>; Mon, 15 Jun 2015 23:53:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C694A203B5 for <patchwork-linux-crypto@patchwork.kernel.org>; Mon, 15 Jun 2015 23:53:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 99EDA203C0 for <patchwork-linux-crypto@patchwork.kernel.org>; Mon, 15 Jun 2015 23:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbbFOXxQ (ORCPT <rfc822;patchwork-linux-crypto@patchwork.kernel.org>); Mon, 15 Jun 2015 19:53:16 -0400 Received: from mail-bn1bon0132.outbound.protection.outlook.com ([157.56.111.132]:13568 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751736AbbFOXxN (ORCPT <rfc822;linux-crypto@vger.kernel.org>); Mon, 15 Jun 2015 19:53:13 -0400 Received: from BLUPR0301MB1569.namprd03.prod.outlook.com (10.162.214.15) by BLUPR0301MB1651.namprd03.prod.outlook.com (10.162.214.145) with Microsoft SMTP Server (TLS) id 15.1.190.14; Mon, 15 Jun 2015 23:53:11 +0000 Received: from BLUPR0301CA0028.namprd03.prod.outlook.com (10.162.113.166) by BLUPR0301MB1569.namprd03.prod.outlook.com (10.162.214.15) with Microsoft SMTP Server (TLS) id 15.1.190.14; Mon, 15 Jun 2015 23:53:10 +0000 Received: from BL2FFO11FD015.protection.gbl (2a01:111:f400:7c09::143) by BLUPR0301CA0028.outlook.office365.com (2a01:111:e400:5259::38) with Microsoft SMTP Server (TLS) id 15.1.190.14 via Frontend Transport; Mon, 15 Jun 2015 23:53:10 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD015.mail.protection.outlook.com (10.173.160.223) with Microsoft SMTP Server (TLS) id 15.1.190.9 via Frontend Transport; Mon, 15 Jun 2015 23:53:10 +0000 Received: from stc-hedley.am.freescale.net (stc-hedley.am.freescale.net [10.67.70.12]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t5FNr7p3003741; Mon, 15 Jun 2015 16:53:09 -0700 From: Victoria Milhoan <vicki.milhoan@freescale.com> To: <linux-crypto@vger.kernel.org> CC: <herbert@gondor.apana.org.au>, <horia.geanta@freescale.com>, <ruchika.gupta@freescale.com> Subject: [PATCH RFC 08/11] crypto: caam - improve initalization for context state saves Date: Mon, 15 Jun 2015 16:52:56 -0700 Message-ID: <1434412379-11623-9-git-send-email-vicki.milhoan@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434412379-11623-1-git-send-email-vicki.milhoan@freescale.com> References: <1434412379-11623-1-git-send-email-vicki.milhoan@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD015; 1:CyKv88qBEEwhjVa/lAgkT4BFjGz4V7kU8hNmrLCpy2MOtty+2QOCt9rYm8AmBvHFASpCmGIgVylKJEeW1HoDF5nsxi0xbe1F6/u0FITpwW7tRQi9a9dvTLx+dmcIzyk/hqMUX2qP/FzCbp0ymt4K+7E+lFYyZ9hRKiLtmccUPeGUqEVP9v1PNllhFRWp1lODznnY9IervmIEZLkgpU1xIzUBIk8zMmW55UsS+EgneZ8ealU+jnY1awmGWilR8bLQ0+kTp+mKgin/U2yKkp15Ns576tgqxGQ0yuTREy3PZV73AcYcSDchDWsDJ+ytXXyMUgumYtZLNeK/kLAQ3Xiycbc4vtgbJ9otwxOXhBgBVJU= X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(189002)(199003)(76176999)(33646002)(36756003)(77156002)(106466001)(50226001)(50986999)(92566002)(46102003)(6806004)(87936001)(575784001)(62966003)(19580405001)(19580395003)(86362001)(2950100001)(104016003)(5001960100002)(110136002)(107886002)(189998001)(48376002)(50466002)(47776003)(85426001)(229853001)(105606002)(77096005)(2351001)(4001430100001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR0301MB1569; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1569; 2:s8BFM8lqi1tzjvIwK9HpS9KHXYy4dYv3lPjCkBrU8k4cfa5uI5ttOKTZcaJdO4bv; 2:ngXW3J1Am49r8tteyx4bj4sV5eDsFH/SaXDw1aVRbX2Y+Mxc+XV9I9z2k1ZfuQHALAF0Nr3uisiR6H2pptAIQ8aKJKu5Cr691RWQvwxK8XOEp9cHosqcGAzTnrIYSZlXOIj0zSqieYTNzfNbb0A0viWM3mY1g8l2zbNp8NZ1jG1SOO8Zb9Yk271KyVzwN67IIPHgCnzTWVZYxvpvZiNYMMdqgCfG81cXei1E6FdV5t0=; 6:8J8TJTSW9DfGIT3HRwXQJlFRNnQFhP0d4bGM+C6ES8zmoMyejkflZeWazv1iHjsQxblLfEPGcSq02+cIyi/0MMByMRCdUYHkY7yx26vo03wXQ957yfykSA80+Vd1Y6jC7+4Hn/HklkgX4BBkvSstsNYPvGY3qL9W/JbWb5K91IPrPqaJmW326rRIXSUAdn5xlobU2EJJc0DvYwnzrcLws3e/1NU5lwRVBhtYsnqjIPSV6GxiDxpOae9hHALoOrJSAsVnlWB1U/Rv1SujqiEuiw89NveddnYxRg/LPm2LbP2wl10Ql5Tm+164vFI8MS0Tlv4CR2iwgOnGulGKXOeUwA== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1569; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1651; X-Microsoft-Antispam-PRVS: <BLUPR0301MB15694BDEFD3CB0994C3A37B9E9B80@BLUPR0301MB1569.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:BLUPR0301MB1569; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1569; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1569; 3:BDqZYzJexZWZoGxxBmFjGIO+46s3xAuedi3pJ9BeFDE+v8peOMfyo7es5koZWgfCZLBzxf1YO5LXLHJrVptHytswJaJ9k+6VEy6h5hCbtRaNO5dwPcaPy1ec76f6GUsF0jhBWw0EkpTiqA/7ZsjYX/1UdlmseLvQv0nUakam1Dy1y2C//ywVG6BBTquC2YLvzTebmPvqYc0djBOay9vqNnDOgE+ZzhETY7qSzy6feOUdVHq8x8UJPr/fbiioOPfNILZYFEyLwQRGL8I+RDpBvni/eSAtBdCkIKkHR4JQGQ86NHdr63hlRw0RO6XCMVnJ X-Forefront-PRVS: 0608DEDB67 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1569; 9:pOhfj2wIQCOnSMvQIWkSc8Luc3zFeR7CMmn48QQb3DpYLXP3YmQh7s7T+ijX8n9EbD/oxO3eOk/25kIP9bUj0sxRggP0ctlHVsmidWWqosmW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5y4v+olW9rVacdNIiGJDRidSQDuZVsYx7PVjcqUPK2L7MQ2+BTIEixHgO0e2aVP7GqpgxeB2FWU=; 6:35o+XhT89krrtfO8JRe4JnCAw4d5PS2DLu3/nZXYUO779tzk7A3CQh3FAnIGtHZd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2015 23:53:10.6054 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1569 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1651; 2:vviSfIpdTKM6YXAQmly+rjeWtkebya9xukqscn32OpiEXZvjZ8imqigB+zEZz1Pe; 2:fze7qGA74XtXpPLf3j0TjTiBSZum6TjxhdCbHlNVixuPBCsZ7n8FgMA5gPgVsFACK+FF8me5nvNqnSgD8vDDv2OArQjXSvPSu9PmzdCgGP4kqJBN//Zi+J2njkNKkID27Q8CoUPtOf1UWyUU1ozJhbV8IkZ36a7ILCdM+FatDP3FtLdRQNf18Vmw2Jyxa94REKhryJsRKOH0+WmPJHBkkV1aMXIY+qbndzMQphKAYlY=; 9:ADb91Au4WUarBstAEpyqVks65LoeSzXRmJ0bktQAgw98LcShM8XtHqWAPM7NY+yG5W0wnwmrd61V9wRwssfO4sGo78EZawAkrZ4yqVJcmxbiRi/B20MNeJQ2Yv77axKedb2ZxzcS3usYzAfuwlzepg== X-OriginatorOrg: freescale.com Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: <linux-crypto.vger.kernel.org> X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On Mon, Jun 15, 2015 at 04:52:56PM -0700, Victoria Milhoan wrote: > From: Steve Cornelius <steve.cornelius@freescale.com> > > Multiple function in asynchronous hashing use a saved-state block, > a.k.a. struct caam_hash_state, which holds a stash of information > between requests (init/update/final). Certain values in this state > block are loaded for processing using an inline-if, and when this > is done, the potential for uninitialized data can pose conflicts. > Therefore, this patch improves initialization of state data to > prevent false assignments using uninitialized data in the state block. Applied to crypto with stable CC.
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 1662c65..f2f1e87 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -1552,6 +1552,8 @@ static int ahash_init(struct ahash_request *req) state->current_buf = 0; state->buf_dma = 0; + state->buflen_0 = 0; + state->buflen_1 = 0; return 0; }