From mboxrd@z Thu Jan 1 00:00:00 1970 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 63BE2C433FE for ; Fri, 21 Oct 2022 11:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbiJULgX (ORCPT ); Fri, 21 Oct 2022 07:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbiJULgU (ORCPT ); Fri, 21 Oct 2022 07:36:20 -0400 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBE0A262DC8; Fri, 21 Oct 2022 04:36:12 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1olqIH-004dqC-90; Fri, 21 Oct 2022 19:35:06 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 21 Oct 2022 19:35:05 +0800 Date: Fri, 21 Oct 2022 19:35:05 +0800 From: Herbert Xu To: Robert Elliott Cc: davem@davemloft.net, jarod@redhat.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: tcrypt - fix return value for multiple subtests Message-ID: References: <20220930214014.37194-1-elliott@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220930214014.37194-1-elliott@hpe.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Sep 30, 2022 at 04:40:14PM -0500, Robert Elliott wrote: > 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 += 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(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt