From nobody Sun May 5 11:12:07 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4E31C433FE for ; Fri, 30 Sep 2022 21:41:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232369AbiI3Vlf (ORCPT ); Fri, 30 Sep 2022 17:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232341AbiI3Vlb (ORCPT ); Fri, 30 Sep 2022 17:41:31 -0400 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 293161A6EB5; Fri, 30 Sep 2022 14:41:27 -0700 (PDT) Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28UKU6n8000753; Fri, 30 Sep 2022 21:41:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pps0720; bh=LvxRN7i3GlP5rBZtiXWtnTHuUir79o8h/VO513pKWeA=; b=hbx9Zio5Gi0X8zU0WKAJA446DnZa8G1UxeGqyiUesALWn/JV0JPEg+41tgqDFGK4WFNT 8xmOGRdOBqODmQUAbNTDNLOIHTDADncqu+YSqKGtU2IyOvK/yzRt3dM9MCSgNuprw68n 5K9IgGmig2AUYh9OepuO/mIYE4vyg2IuazqDD3qaPjsIRufsGHHGS2tMU7kSsZfP351G 5UkRkJBztnwfPwOE8Y/YZvoPIqfvUixtS0lBQxt1kDgTFXk/PaCPAX0q/ANhsuSdezoJ y60gOY8poUXsAq/ddQ5l5W5d98ayEiFPayBMVI41eUV+WRN8pzx0If7kKpmEL8stRGpC 0w== Received: from p1lg14878.it.hpe.com (p1lg14878.it.hpe.com [16.230.97.204]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3jx2q9abkp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Sep 2022 21:41:20 +0000 Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14878.it.hpe.com (Postfix) with ESMTPS id ECF6DD25B; Fri, 30 Sep 2022 21:41:18 +0000 (UTC) Received: from adevxp033-sys.us.rdlabs.hpecorp.net (unknown [16.231.227.36]) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTP id 5D28A806766; Fri, 30 Sep 2022 21:41:18 +0000 (UTC) From: Robert Elliott To: herbert@gondor.apana.org.au, davem@davemloft.net, jarod@redhat.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Elliott Subject: [PATCH] crypto: tcrypt - fix return value for multiple subtests Date: Fri, 30 Sep 2022 16:40:14 -0500 Message-Id: <20220930214014.37194-1-elliott@hpe.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: g9uvCet19u3peJxypk8f92YiHaw3tVbv X-Proofpoint-ORIG-GUID: g9uvCet19u3peJxypk8f92YiHaw3tVbv X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-30_04,2022-09-29_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 bulkscore=0 clxscore=1011 malwarescore=0 phishscore=0 spamscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 mlxlogscore=953 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209300135 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When a test mode invokes multiple tests (e.g., mode 0 invokes modes 1 through 199, and mode 3 tests three block cipher modes with des), don't keep accumulating the return values with ret +=3D tcrypt_test(), which results in a bogus value if more than one report a nonzero value (e.g., two reporting -2 (-ENOENT) end up reporting -4 (-EINTR)). Instead, keep track of the minimum return value reported by any subtest. Fixes: 4e033a6bc70f ("crypto: tcrypt - Do not exit on success in fips mode") Signed-off-by: Robert Elliott --- crypto/tcrypt.c | 256 ++++++++++++++++++++++++------------------------ 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index e85f623c3c54..c0fb4427c647 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1471,387 +1471,387 @@ static int do_test(const char *alg, u32 type, u32= mask, int m, u32 num_mb) } =20 for (i =3D 1; i < 200; i++) - ret +=3D do_test(NULL, 0, 0, i, num_mb); + ret =3D min(ret, do_test(NULL, 0, 0, i, num_mb)); break; =20 case 1: - ret +=3D tcrypt_test("md5"); + ret =3D min(ret, tcrypt_test("md5")); break; =20 case 2: - ret +=3D tcrypt_test("sha1"); + ret =3D min(ret, tcrypt_test("sha1")); break; =20 case 3: - ret +=3D tcrypt_test("ecb(des)"); - ret +=3D tcrypt_test("cbc(des)"); - ret +=3D tcrypt_test("ctr(des)"); + ret =3D min(ret, tcrypt_test("ecb(des)")); + ret =3D min(ret, tcrypt_test("cbc(des)")); + ret =3D min(ret, tcrypt_test("ctr(des)")); break; =20 case 4: - ret +=3D tcrypt_test("ecb(des3_ede)"); - ret +=3D tcrypt_test("cbc(des3_ede)"); - ret +=3D tcrypt_test("ctr(des3_ede)"); + ret =3D min(ret, tcrypt_test("ecb(des3_ede)")); + ret =3D min(ret, tcrypt_test("cbc(des3_ede)")); + ret =3D min(ret, tcrypt_test("ctr(des3_ede)")); break; =20 case 5: - ret +=3D tcrypt_test("md4"); + ret =3D min(ret, tcrypt_test("md4")); break; =20 case 6: - ret +=3D tcrypt_test("sha256"); + ret =3D min(ret, tcrypt_test("sha256")); break; =20 case 7: - ret +=3D tcrypt_test("ecb(blowfish)"); - ret +=3D tcrypt_test("cbc(blowfish)"); - ret +=3D tcrypt_test("ctr(blowfish)"); + ret =3D min(ret, tcrypt_test("ecb(blowfish)")); + ret =3D min(ret, tcrypt_test("cbc(blowfish)")); + ret =3D min(ret, tcrypt_test("ctr(blowfish)")); break; =20 case 8: - ret +=3D tcrypt_test("ecb(twofish)"); - ret +=3D tcrypt_test("cbc(twofish)"); - ret +=3D tcrypt_test("ctr(twofish)"); - ret +=3D tcrypt_test("lrw(twofish)"); - ret +=3D tcrypt_test("xts(twofish)"); + ret =3D min(ret, tcrypt_test("ecb(twofish)")); + ret =3D min(ret, tcrypt_test("cbc(twofish)")); + ret =3D min(ret, tcrypt_test("ctr(twofish)")); + ret =3D min(ret, tcrypt_test("lrw(twofish)")); + ret =3D min(ret, tcrypt_test("xts(twofish)")); break; =20 case 9: - ret +=3D tcrypt_test("ecb(serpent)"); - ret +=3D tcrypt_test("cbc(serpent)"); - ret +=3D tcrypt_test("ctr(serpent)"); - ret +=3D tcrypt_test("lrw(serpent)"); - ret +=3D tcrypt_test("xts(serpent)"); + ret =3D min(ret, tcrypt_test("ecb(serpent)")); + ret =3D min(ret, tcrypt_test("cbc(serpent)")); + ret =3D min(ret, tcrypt_test("ctr(serpent)")); + ret =3D min(ret, tcrypt_test("lrw(serpent)")); + ret =3D min(ret, tcrypt_test("xts(serpent)")); break; =20 case 10: - ret +=3D tcrypt_test("ecb(aes)"); - ret +=3D tcrypt_test("cbc(aes)"); - ret +=3D tcrypt_test("lrw(aes)"); - ret +=3D tcrypt_test("xts(aes)"); - ret +=3D tcrypt_test("ctr(aes)"); - ret +=3D tcrypt_test("rfc3686(ctr(aes))"); - ret +=3D tcrypt_test("ofb(aes)"); - ret +=3D tcrypt_test("cfb(aes)"); - ret +=3D tcrypt_test("xctr(aes)"); + ret =3D min(ret, tcrypt_test("ecb(aes)")); + ret =3D min(ret, tcrypt_test("cbc(aes)")); + ret =3D min(ret, tcrypt_test("lrw(aes)")); + ret =3D min(ret, tcrypt_test("xts(aes)")); + ret =3D min(ret, tcrypt_test("ctr(aes)")); + ret =3D min(ret, tcrypt_test("rfc3686(ctr(aes))")); + ret =3D min(ret, tcrypt_test("ofb(aes)")); + ret =3D min(ret, tcrypt_test("cfb(aes)")); + ret =3D min(ret, tcrypt_test("xctr(aes)")); break; =20 case 11: - ret +=3D tcrypt_test("sha384"); + ret =3D min(ret, tcrypt_test("sha384")); break; =20 case 12: - ret +=3D tcrypt_test("sha512"); + ret =3D min(ret, tcrypt_test("sha512")); break; =20 case 13: - ret +=3D tcrypt_test("deflate"); + ret =3D min(ret, tcrypt_test("deflate")); break; =20 case 14: - ret +=3D tcrypt_test("ecb(cast5)"); - ret +=3D tcrypt_test("cbc(cast5)"); - ret +=3D tcrypt_test("ctr(cast5)"); + ret =3D min(ret, tcrypt_test("ecb(cast5)")); + ret =3D min(ret, tcrypt_test("cbc(cast5)")); + ret =3D min(ret, tcrypt_test("ctr(cast5)")); break; =20 case 15: - ret +=3D tcrypt_test("ecb(cast6)"); - ret +=3D tcrypt_test("cbc(cast6)"); - ret +=3D tcrypt_test("ctr(cast6)"); - ret +=3D tcrypt_test("lrw(cast6)"); - ret +=3D tcrypt_test("xts(cast6)"); + ret =3D min(ret, tcrypt_test("ecb(cast6)")); + ret =3D min(ret, tcrypt_test("cbc(cast6)")); + ret =3D min(ret, tcrypt_test("ctr(cast6)")); + ret =3D min(ret, tcrypt_test("lrw(cast6)")); + ret =3D min(ret, tcrypt_test("xts(cast6)")); break; =20 case 16: - ret +=3D tcrypt_test("ecb(arc4)"); + ret =3D min(ret, tcrypt_test("ecb(arc4)")); break; =20 case 17: - ret +=3D tcrypt_test("michael_mic"); + ret =3D min(ret, tcrypt_test("michael_mic")); break; =20 case 18: - ret +=3D tcrypt_test("crc32c"); + ret =3D min(ret, tcrypt_test("crc32c")); break; =20 case 19: - ret +=3D tcrypt_test("ecb(tea)"); + ret =3D min(ret, tcrypt_test("ecb(tea)")); break; =20 case 20: - ret +=3D tcrypt_test("ecb(xtea)"); + ret =3D min(ret, tcrypt_test("ecb(xtea)")); break; =20 case 21: - ret +=3D tcrypt_test("ecb(khazad)"); + ret =3D min(ret, tcrypt_test("ecb(khazad)")); break; =20 case 22: - ret +=3D tcrypt_test("wp512"); + ret =3D min(ret, tcrypt_test("wp512")); break; =20 case 23: - ret +=3D tcrypt_test("wp384"); + ret =3D min(ret, tcrypt_test("wp384")); break; =20 case 24: - ret +=3D tcrypt_test("wp256"); + ret =3D min(ret, tcrypt_test("wp256")); break; =20 case 26: - ret +=3D tcrypt_test("ecb(anubis)"); - ret +=3D tcrypt_test("cbc(anubis)"); + ret =3D min(ret, tcrypt_test("ecb(anubis)")); + ret =3D min(ret, tcrypt_test("cbc(anubis)")); break; =20 case 30: - ret +=3D tcrypt_test("ecb(xeta)"); + ret =3D min(ret, tcrypt_test("ecb(xeta)")); break; =20 case 31: - ret +=3D tcrypt_test("pcbc(fcrypt)"); + ret =3D min(ret, tcrypt_test("pcbc(fcrypt)")); break; =20 case 32: - ret +=3D tcrypt_test("ecb(camellia)"); - ret +=3D tcrypt_test("cbc(camellia)"); - ret +=3D tcrypt_test("ctr(camellia)"); - ret +=3D tcrypt_test("lrw(camellia)"); - ret +=3D tcrypt_test("xts(camellia)"); + ret =3D min(ret, tcrypt_test("ecb(camellia)")); + ret =3D min(ret, tcrypt_test("cbc(camellia)")); + ret =3D min(ret, tcrypt_test("ctr(camellia)")); + ret =3D min(ret, tcrypt_test("lrw(camellia)")); + ret =3D min(ret, tcrypt_test("xts(camellia)")); break; =20 case 33: - ret +=3D tcrypt_test("sha224"); + ret =3D min(ret, tcrypt_test("sha224")); break; =20 case 35: - ret +=3D tcrypt_test("gcm(aes)"); + ret =3D min(ret, tcrypt_test("gcm(aes)")); break; =20 case 36: - ret +=3D tcrypt_test("lzo"); + ret =3D min(ret, tcrypt_test("lzo")); break; =20 case 37: - ret +=3D tcrypt_test("ccm(aes)"); + ret =3D min(ret, tcrypt_test("ccm(aes)")); break; =20 case 38: - ret +=3D tcrypt_test("cts(cbc(aes))"); + ret =3D min(ret, tcrypt_test("cts(cbc(aes))")); break; =20 case 39: - ret +=3D tcrypt_test("xxhash64"); + ret =3D min(ret, tcrypt_test("xxhash64")); break; =20 case 40: - ret +=3D tcrypt_test("rmd160"); + ret =3D min(ret, tcrypt_test("rmd160")); break; =20 case 42: - ret +=3D tcrypt_test("blake2b-512"); + ret =3D min(ret, tcrypt_test("blake2b-512")); break; =20 case 43: - ret +=3D tcrypt_test("ecb(seed)"); + ret =3D min(ret, tcrypt_test("ecb(seed)")); break; =20 case 45: - ret +=3D tcrypt_test("rfc4309(ccm(aes))"); + ret =3D min(ret, tcrypt_test("rfc4309(ccm(aes))")); break; =20 case 46: - ret +=3D tcrypt_test("ghash"); + ret =3D min(ret, tcrypt_test("ghash")); break; =20 case 47: - ret +=3D tcrypt_test("crct10dif"); + ret =3D min(ret, tcrypt_test("crct10dif")); break; =20 case 48: - ret +=3D tcrypt_test("sha3-224"); + ret =3D min(ret, tcrypt_test("sha3-224")); break; =20 case 49: - ret +=3D tcrypt_test("sha3-256"); + ret =3D min(ret, tcrypt_test("sha3-256")); break; =20 case 50: - ret +=3D tcrypt_test("sha3-384"); + ret =3D min(ret, tcrypt_test("sha3-384")); break; =20 case 51: - ret +=3D tcrypt_test("sha3-512"); + ret =3D min(ret, tcrypt_test("sha3-512")); break; =20 case 52: - ret +=3D tcrypt_test("sm3"); + ret =3D min(ret, tcrypt_test("sm3")); break; =20 case 53: - ret +=3D tcrypt_test("streebog256"); + ret =3D min(ret, tcrypt_test("streebog256")); break; =20 case 54: - ret +=3D tcrypt_test("streebog512"); + ret =3D min(ret, tcrypt_test("streebog512")); break; =20 case 55: - ret +=3D tcrypt_test("gcm(sm4)"); + ret =3D min(ret, tcrypt_test("gcm(sm4)")); break; =20 case 56: - ret +=3D tcrypt_test("ccm(sm4)"); + ret =3D min(ret, tcrypt_test("ccm(sm4)")); break; =20 case 57: - ret +=3D tcrypt_test("polyval"); + ret =3D min(ret, tcrypt_test("polyval")); break; =20 case 58: - ret +=3D tcrypt_test("gcm(aria)"); + ret =3D min(ret, tcrypt_test("gcm(aria)")); break; =20 case 100: - ret +=3D tcrypt_test("hmac(md5)"); + ret =3D min(ret, tcrypt_test("hmac(md5)")); break; =20 case 101: - ret +=3D tcrypt_test("hmac(sha1)"); + ret =3D min(ret, tcrypt_test("hmac(sha1)")); break; =20 case 102: - ret +=3D tcrypt_test("hmac(sha256)"); + ret =3D min(ret, tcrypt_test("hmac(sha256)")); break; =20 case 103: - ret +=3D tcrypt_test("hmac(sha384)"); + ret =3D min(ret, tcrypt_test("hmac(sha384)")); break; =20 case 104: - ret +=3D tcrypt_test("hmac(sha512)"); + ret =3D min(ret, tcrypt_test("hmac(sha512)")); break; =20 case 105: - ret +=3D tcrypt_test("hmac(sha224)"); + ret =3D min(ret, tcrypt_test("hmac(sha224)")); break; =20 case 106: - ret +=3D tcrypt_test("xcbc(aes)"); + ret =3D min(ret, tcrypt_test("xcbc(aes)")); break; =20 case 108: - ret +=3D tcrypt_test("hmac(rmd160)"); + ret =3D min(ret, tcrypt_test("hmac(rmd160)")); break; =20 case 109: - ret +=3D tcrypt_test("vmac64(aes)"); + ret =3D min(ret, tcrypt_test("vmac64(aes)")); break; =20 case 111: - ret +=3D tcrypt_test("hmac(sha3-224)"); + ret =3D min(ret, tcrypt_test("hmac(sha3-224)")); break; =20 case 112: - ret +=3D tcrypt_test("hmac(sha3-256)"); + ret =3D min(ret, tcrypt_test("hmac(sha3-256)")); break; =20 case 113: - ret +=3D tcrypt_test("hmac(sha3-384)"); + ret =3D min(ret, tcrypt_test("hmac(sha3-384)")); break; =20 case 114: - ret +=3D tcrypt_test("hmac(sha3-512)"); + ret =3D min(ret, tcrypt_test("hmac(sha3-512)")); break; =20 case 115: - ret +=3D tcrypt_test("hmac(streebog256)"); + ret =3D min(ret, tcrypt_test("hmac(streebog256)")); break; =20 case 116: - ret +=3D tcrypt_test("hmac(streebog512)"); + ret =3D min(ret, tcrypt_test("hmac(streebog512)")); break; =20 case 150: - ret +=3D tcrypt_test("ansi_cprng"); + ret =3D min(ret, tcrypt_test("ansi_cprng")); break; =20 case 151: - ret +=3D tcrypt_test("rfc4106(gcm(aes))"); + ret =3D min(ret, tcrypt_test("rfc4106(gcm(aes))")); break; =20 case 152: - ret +=3D tcrypt_test("rfc4543(gcm(aes))"); + ret =3D min(ret, tcrypt_test("rfc4543(gcm(aes))")); break; =20 case 153: - ret +=3D tcrypt_test("cmac(aes)"); + ret =3D min(ret, tcrypt_test("cmac(aes)")); break; =20 case 154: - ret +=3D tcrypt_test("cmac(des3_ede)"); + ret =3D min(ret, tcrypt_test("cmac(des3_ede)")); break; =20 case 155: - ret +=3D tcrypt_test("authenc(hmac(sha1),cbc(aes))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha1),cbc(aes))")); break; =20 case 156: - ret +=3D tcrypt_test("authenc(hmac(md5),ecb(cipher_null))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(md5),ecb(cipher_null))")); break; =20 case 157: - ret +=3D tcrypt_test("authenc(hmac(sha1),ecb(cipher_null))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha1),ecb(cipher_null))")); break; =20 case 158: - ret +=3D tcrypt_test("cbcmac(sm4)"); + ret =3D min(ret, tcrypt_test("cbcmac(sm4)")); break; =20 case 159: - ret +=3D tcrypt_test("cmac(sm4)"); + ret =3D min(ret, tcrypt_test("cmac(sm4)")); break; =20 case 181: - ret +=3D tcrypt_test("authenc(hmac(sha1),cbc(des))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha1),cbc(des))")); break; case 182: - ret +=3D tcrypt_test("authenc(hmac(sha1),cbc(des3_ede))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha1),cbc(des3_ede))")); break; case 183: - ret +=3D tcrypt_test("authenc(hmac(sha224),cbc(des))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha224),cbc(des))")); break; case 184: - ret +=3D tcrypt_test("authenc(hmac(sha224),cbc(des3_ede))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha224),cbc(des3_ede))")); break; case 185: - ret +=3D tcrypt_test("authenc(hmac(sha256),cbc(des))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha256),cbc(des))")); break; case 186: - ret +=3D tcrypt_test("authenc(hmac(sha256),cbc(des3_ede))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha256),cbc(des3_ede))")); break; case 187: - ret +=3D tcrypt_test("authenc(hmac(sha384),cbc(des))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha384),cbc(des))")); break; case 188: - ret +=3D tcrypt_test("authenc(hmac(sha384),cbc(des3_ede))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha384),cbc(des3_ede))")); break; case 189: - ret +=3D tcrypt_test("authenc(hmac(sha512),cbc(des))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha512),cbc(des))")); break; case 190: - ret +=3D tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))"); + ret =3D min(ret, tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))")); break; case 191: - ret +=3D tcrypt_test("ecb(sm4)"); - ret +=3D tcrypt_test("cbc(sm4)"); - ret +=3D tcrypt_test("cfb(sm4)"); - ret +=3D tcrypt_test("ctr(sm4)"); + ret =3D min(ret, tcrypt_test("ecb(sm4)")); + ret =3D min(ret, tcrypt_test("cbc(sm4)")); + ret =3D min(ret, tcrypt_test("cfb(sm4)")); + ret =3D min(ret, tcrypt_test("ctr(sm4)")); break; case 192: - ret +=3D tcrypt_test("ecb(aria)"); - ret +=3D tcrypt_test("cbc(aria)"); - ret +=3D tcrypt_test("cfb(aria)"); - ret +=3D tcrypt_test("ctr(aria)"); + ret =3D min(ret, tcrypt_test("ecb(aria)")); + ret =3D min(ret, tcrypt_test("cbc(aria)")); + ret =3D min(ret, tcrypt_test("cfb(aria)")); + ret =3D min(ret, tcrypt_test("ctr(aria)")); break; case 200: test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, --=20 2.37.2