Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2499194rwi; Fri, 21 Oct 2022 04:43:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7GhjZswA4bTYCz51T97vXlX6uhl+pWtF75qF4EVEejs5x/JD+XQgMC09zCPpr2rfo5xZoj X-Received: by 2002:a05:6402:27cd:b0:45c:db6f:7e77 with SMTP id c13-20020a05640227cd00b0045cdb6f7e77mr17258482ede.149.1666352590396; Fri, 21 Oct 2022 04:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666352590; cv=none; d=google.com; s=arc-20160816; b=KH4v1Y08AekaXOJlTYpyg4kamrZsqYFGG8TepWKeL1+gKG93Kaxt2sHN+IOknn1qIw GNvG7sJHY21g8EPbp0dWk8fAh6hLoCmrX+oIc5ySRIawwcdIVxJOpztlV/0EW34bSrOz DdcMlWrQsIdmsIdmK6ZQEyeRHX1GsLobnFP/RWeHZCfEylqDzw/Ogl4+mdmDZgf3NZLF TIbBehozhbPiZrvnHzBvceVwmCQ0ae6TO2enjYtzSUiwur4sK6sdJqCRmVnNT9zZvv5J +8Mbq8w1x/RAtPoQ/VpxfZnkIbBpafDPL9DNWXh2ARosMw1V1OI692pBOEBtFMLvOHrF Qtew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lj++Lm4P8O06yaZvkkYhVueFnTqEDc2amqeph03GluM=; b=ZvcqvwWG0CYNjKT+U2iMNvTShSmRtfiAlnxvypcHDeQ1r1JVPRTIzynFsdd6cPmHJB uTf4S9/wEL7H0E6p1cYse4UP8fTH/gD3nZjGV0LgVaFlGLo7kEfZUi+RffJ8klTs7kaq 87zNgrm9CjpwS5OUBa4QMqJ7Ahqkf6heD6c+0ZrvsCgi+k/ItYiz4GrYuLigYhRRc8lq 1O0MuxTM6cXPJrlV0FmFFGmx6iZiS/zLKiSgPNvZuB2Dj1QzJd1GF9+At11Q1bc5RrNe ZE19mOaH4MB81TAvJimdW8Q9YhE5QNZsAo08OtnFthDsNlDtFA+FwlvJqxHiyXG9roKe xslg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp14-20020a170906c14e00b00773e2e6f605si19505733ejc.930.2022.10.21.04.42.45; Fri, 21 Oct 2022 04:43:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbiJULgX (ORCPT + 99 others); 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> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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