Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3430285imu; Sun, 11 Nov 2018 14:56:34 -0800 (PST) X-Google-Smtp-Source: AJdET5dQKD10h5bNhLNgxFUV00mECqaDyksGAIPfmnQ7phXBK3nqu3iZOTHu94uTEhhQ1V4LiKLJ X-Received: by 2002:a17:902:380c:: with SMTP id l12-v6mr17680490plc.37.1541976993966; Sun, 11 Nov 2018 14:56:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976993; cv=none; d=google.com; s=arc-20160816; b=uYaSVWJ/lAf2Tu6xQr7fRmupNktXKpshyAU6ai0gkkEZiUAC7+Jk9PXQUGu2f5WF3+ 8RGXwo6az1FcYi8S/2d28UOl7sW/isfWeIqTAN6Ij6Ljm2o2xX+KB2uSYGYlENkxkq0z LK/0I3zdhA2NbxxvifxQw6KJg6Ot8nQg8GEqBNToVnMXnd7kIMJzfUowTF4AWSLE8pBo wvXC3gRLLrhjWMW1lMgUVSTRC/RWobv23S0hFdCc27EkKKyy26yNIfh0iRca9dLbus46 X6L/fgyzlFI+UiAHXw+nV28Tpyw1S5gAaFrPDLkVo0LD+V/pkqO/A+ypI79k9rHKZftH Yb6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ahNeGwDluXHcsM1GCinQ9VBoowdExszvlP+Xf/mwvoQ=; b=s7QhmQTm4Kqr7Lde83LFaOHqnF4DbuEA/bKsKJ21rd3M5aFC0Hc9cbSRATMr117Pw1 911emlOYlrO+AlXLoMQWKto+L7Kej1gedqKunxXxDOqufzfuZXuG/XYVnO2iV+IeiFgX ddXE8it1Je/C2rtuIDHtubmaVf6az8DPpuZTFHyopB0kFmsWCNr8Wk30tnPGMjAOrbBL 0XDEF4Un7j1/gLxlEICnQyTMrMO7x/GK0XaayMzN3vK2qviIhMWUf4ouglfdOv7YPzSR sxu0o5+50Be35VoLqLM+amj69sbiYSpPI+UpM2GOKGjTed8ANsBPk3ajt2MHisTABpaZ 4ZgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tlxNVcGA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be8-v6si15146419plb.143.2018.11.11.14.56.19; Sun, 11 Nov 2018 14:56:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tlxNVcGA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403909AbeKLIWx (ORCPT + 99 others); Mon, 12 Nov 2018 03:22:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:54642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403867AbeKLIWw (ORCPT ); Mon, 12 Nov 2018 03:22:52 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33086223CB; Sun, 11 Nov 2018 22:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975574; bh=0Ma38jkRupy2pYtxRS4H+YUFE7Y0EpGhoz+YaGLOkEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tlxNVcGAkaCEPyJUrUWXpLglE0pvsjOI3GmIPz8nf70Uo3KMeYxd+Kif6vVdIXlo/ g7M229DFZTEY/Fg7fCp3MpnXclH+1rnHElSVEwDkFZJJfq1cVyXHyBNcVGqicRtOYV 3/V15KvqRoaocwqbfLi7/SEzXEEHfmElFiHQ7P9M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Franck Lenormand , =?UTF-8?q?Horia=20Geant=C4=83?= , Ard Biesheuvel , Herbert Xu Subject: [PATCH 4.14 152/222] crypto: tcrypt - fix ghash-generic speed test Date: Sun, 11 Nov 2018 14:24:09 -0800 Message-Id: <20181111221700.964106344@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Horia Geantă commit 331351f89c36bf7d03561a28b6f64fa10a9f6f3a upstream. ghash is a keyed hash algorithm, thus setkey needs to be called. Otherwise the following error occurs: $ modprobe tcrypt mode=318 sec=1 testing speed of async ghash-generic (ghash-generic) tcrypt: test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): tcrypt: hashing failed ret=-126 Cc: # 4.6+ Fixes: 0660511c0bee ("crypto: tcrypt - Use ahash") Tested-by: Franck Lenormand Signed-off-by: Horia Geantă Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/tcrypt.c | 3 +++ 1 file changed, 3 insertions(+) --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -727,6 +727,9 @@ static void test_ahash_speed_common(cons break; } + if (speed[i].klen) + crypto_ahash_setkey(tfm, tvmem[0], speed[i].klen); + pr_info("test%3u " "(%5u byte blocks,%5u bytes per update,%4u updates): ", i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen);