From patchwork Tue Feb 3 13:59:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Stoica X-Patchwork-Id: 5768711 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: 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 AF84C9F399 for ; Tue, 3 Feb 2015 14:00:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA4562015E for ; Tue, 3 Feb 2015 14:00:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD4D3202A1 for ; Tue, 3 Feb 2015 14:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965060AbbBCOA2 (ORCPT ); Tue, 3 Feb 2015 09:00:28 -0500 Received: from mail-bn1bbn0109.outbound.protection.outlook.com ([157.56.111.109]:64306 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964781AbbBCOA0 (ORCPT ); Tue, 3 Feb 2015 09:00:26 -0500 Received: from BY2PR03CA057.namprd03.prod.outlook.com (10.141.249.30) by DM2PR0301MB0624.namprd03.prod.outlook.com (25.160.95.28) with Microsoft SMTP Server (TLS) id 15.1.75.20; Tue, 3 Feb 2015 14:00:22 +0000 Received: from BN1BFFO11FD050.protection.gbl (2a01:111:f400:7c10::1:133) by BY2PR03CA057.outlook.office365.com (2a01:111:e400:2c5d::30) with Microsoft SMTP Server (TLS) id 15.1.75.20 via Frontend Transport; Tue, 3 Feb 2015 14:00:22 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD050.mail.protection.outlook.com (10.58.145.5) with Microsoft SMTP Server (TLS) id 15.1.87.10 via Frontend Transport; Tue, 3 Feb 2015 14:00:21 +0000 Received: from legolas.ea.freescale.net (legolas.ea.freescale.net [10.171.73.82]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t13E05Sx002898; Tue, 3 Feb 2015 07:00:16 -0700 From: Cristian Stoica To: , CC: , Cristian Stoica Subject: [PATCH] crypto: tcrypt speed: fix filter for aead algorithms Date: Tue, 3 Feb 2015 15:59:48 +0200 Message-ID: <1422971988-21517-1-git-send-email-cristian.stoica@freescale.com> X-Mailer: git-send-email 2.0.5 X-EOPAttributedMessage: 0 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; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=cristian.stoica@freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(36756003)(77096005)(47776003)(105606002)(87936001)(33646002)(46102003)(106466001)(50466002)(50226001)(48376002)(85426001)(92566002)(104016003)(6806004)(229853001)(19580405001)(62966003)(77156002)(19580395003)(50986999); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB0624; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0624; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:DM2PR0301MB0624; X-Forefront-PRVS: 0476D4AB88 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:DM2PR0301MB0624; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2015 14:00:21.1536 (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] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0624 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 test_aead_speed is written for sync algorithms without specifically requiring them. The effect is that an async algorithm may be used without setting up the request callback, this leading to a kernel panic. Signed-off-by: Cristian Stoica --- crypto/tcrypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 4b9e23f..5dc5a25 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -314,7 +314,8 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs, asg = &sg[8]; sgout = &asg[8]; - tfm = crypto_alloc_aead(algo, 0, 0); + /* This test is not for ASYNC algorithms */ + tfm = crypto_alloc_aead(algo, 0, CRYPTO_ALG_ASYNC); if (IS_ERR(tfm)) { pr_err("alg: aead: Failed to load transform for %s: %ld\n", algo,