Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp55631pxj; Thu, 20 May 2021 04:28:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLpE8NgUnsXH3A7NmBlAxETPdZNEz9tSCycUE3gqyUwvNBhJmU1O1TVZaiF0ZKiaPYyX+H X-Received: by 2002:a50:fb0a:: with SMTP id d10mr4409607edq.47.1621510093232; Thu, 20 May 2021 04:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621510093; cv=none; d=google.com; s=arc-20160816; b=eO6sPZMi5shpns++qu5uIT0ovOIjP+QCjwf+9UG7QD+oLGH3VkulBBmxkwbPKbf4yB gKE5E+gfpZ36ZO5epOhf3VGEiLVvvry+/FL81HHLHW2QaZv2tO4GfQAztu4PF4jYH+Va n27tWGeqC8ok8kvQHZewHHGwOfLq/06+PyDrT14de2h7G86vVRrfx5IFhQD4nbkvGClX AO0e2xph2aRen2ORw4JTOxuTbHk8A6Bc7ynNkfmHU5Ot89cRap/3Pb3ElkGI/tg5Mzn8 lnJsRYWyorXLLyV94AtokzGCpgIrOxWkbKGV9DxOysHqe1tftYzmqtqoisLK4JNzTfCj u5Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/boM4C/2qR5RM4vb1BwwefDiC3RZ8hor/cCms1fSaII=; b=kmsLKQvazSJygS/RLDl89a9V/LuDvt02AqShzsYfdJdXqj3Ld8DsP+a5KttOnxzdtU 8k4I1X1tSM8JXVV/BJ1xbkrI6LKHDafI4FLAgkY6eAebJxhk2kDfuPAepEzVv+iQpUkw FC7Oun5VbZrlf+X3hZsJD2dg8nLYFi0aCUfJq9BOp2/6bLA8rknQ9PGCHXJBWiLfWoqE sHl1e+mWTOxAldbbRsIQWAUGCPnf5+VcTi4u6SbYGRCj9TE3HvbEi/6l740SOXeyNAUV B9GKhLcbkz56FrvxjeqNTMdXw3emPgRsUx3Q+2HHv8fRw7VW67kwwDl7h2TlBL1ecsJN QSmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fc2INZ9k; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp6si2233807ejc.146.2021.05.20.04.27.28; Thu, 20 May 2021 04:28:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fc2INZ9k; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241591AbhETL1g (ORCPT + 99 others); Thu, 20 May 2021 07:27:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:46008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241797AbhETLZa (ORCPT ); Thu, 20 May 2021 07:25:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A93CA6024A; Thu, 20 May 2021 10:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621507215; bh=DaMF7xS50T/cErXF4F9F0/PzUrKl+bhv7rTC35uT2SY=; h=From:To:Cc:Subject:Date:From; b=Fc2INZ9kn2Jzzr373aEu4ur0CSHJdlkTE31jyN0ccgLr/wR8+fCSCbvaAjVUG67xK SmrDvCyPeup51JDBGRzkdOFV2WqHzPU19fmQ+tSW1udeB/VFm1LHp8W7O2WE859ZwA s0AwG8Srp4W9h1kC/Xa/+4kdIkmnCedPgKleERESizNC3fTi984kmNo433dDCVv3H3 N8Ok/HXuICZI+IwKjlo7NEsIByUmFiFjL0MQfiaGXqN2nXDPtLHbdJrRT1Iem+KokB yfNVRqkFkWOh2drP99cY/I03Z6hUBp1sQYkRnQxB3+YChZHogsF2S7ye7OIv9Gp6TO OfGMl7xzXJhzA== From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org, pbrobinson@gmail.com, Ard Biesheuvel Subject: [PATCH] crypto: tcrypt - enable tests for xxhash and blake2 Date: Thu, 20 May 2021 12:40:00 +0200 Message-Id: <20210520104000.47696-1-ardb@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Fill some of the recently freed up slots in tcrypt with xxhash64 and blake2b/blake2s, so we can easily benchmark their kernel implementations from user space. Signed-off-by: Ard Biesheuvel --- crypto/tcrypt.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 6b7c158dc508..f8d06da78e4f 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1847,10 +1847,22 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) ret += tcrypt_test("cts(cbc(aes))"); break; + case 39: + ret += tcrypt_test("xxhash64"); + break; + case 40: ret += tcrypt_test("rmd160"); break; + case 41: + ret += tcrypt_test("blake2s-256"); + break; + + case 42: + ret += tcrypt_test("blake2b-512"); + break; + case 43: ret += tcrypt_test("ecb(seed)"); break; @@ -2356,10 +2368,22 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) test_hash_speed("sha224", sec, generic_hash_speed_template); if (mode > 300 && mode < 400) break; fallthrough; + case 314: + test_hash_speed("xxhash64", sec, generic_hash_speed_template); + if (mode > 300 && mode < 400) break; + fallthrough; case 315: test_hash_speed("rmd160", sec, generic_hash_speed_template); if (mode > 300 && mode < 400) break; fallthrough; + case 316: + test_hash_speed("blake2s-256", sec, generic_hash_speed_template); + if (mode > 300 && mode < 400) break; + fallthrough; + case 317: + test_hash_speed("blake2b-512", sec, generic_hash_speed_template); + if (mode > 300 && mode < 400) break; + fallthrough; case 318: klen = 16; test_hash_speed("ghash", sec, generic_hash_speed_template); @@ -2456,10 +2480,22 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) test_ahash_speed("sha224", sec, generic_hash_speed_template); if (mode > 400 && mode < 500) break; fallthrough; + case 414: + test_ahash_speed("xxhash64", sec, generic_hash_speed_template); + if (mode > 400 && mode < 500) break; + fallthrough; case 415: test_ahash_speed("rmd160", sec, generic_hash_speed_template); if (mode > 400 && mode < 500) break; fallthrough; + case 416: + test_ahash_speed("blake2s-256", sec, generic_hash_speed_template); + if (mode > 400 && mode < 500) break; + fallthrough; + case 417: + test_ahash_speed("blake2b-512", sec, generic_hash_speed_template); + if (mode > 400 && mode < 500) break; + fallthrough; case 418: test_ahash_speed("sha3-224", sec, generic_hash_speed_template); if (mode > 400 && mode < 500) break; -- 2.20.1