Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp92026rwb; Fri, 19 Aug 2022 17:41:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR5V6v/CSVd835/AMX3PkQWYGIZxhH0GAnyOLSsEPvPiMv0Mi0LEe7TQ4whFvC05+NnHYDc/ X-Received: by 2002:a05:6402:3583:b0:43d:6943:44a with SMTP id y3-20020a056402358300b0043d6943044amr7739477edc.409.1660956116559; Fri, 19 Aug 2022 17:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660956116; cv=none; d=google.com; s=arc-20160816; b=J78wJ7NgMYtkqsjZ43x0I9oAN1g5syjCFQvu2v5bVyMOZUcpErs/2FDcGtQzeBUvYN GKUFRHFBaHhABggoFa93mrl6U2rqw/jEEj8vCheOnY1bumguMOlIVoCl8ze5oGsihpUU ivijjDtfmo6QcBVzVdo6b8XDiHCVSmJKNmKab5iyakOC8nywaduo4Iuu5mXgewN/U+S+ FZgZ+zA77aA5LxJuBf+kQQK1j3hnwTvQlnzy4yaIcIqCJwAdzhBCrJKOn0c2cmahs/9z NXhPflfUWqw9vK1FRTJLyanuuzDA/p0Zw8aHsbSpjFMGf8CWyP+pP8mKVaYzY18u0wGF +DIA== 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:dkim-signature; bh=+CBIwp283b35Q/lboqeD/LuY3oBW6Nm/9KRzrqxqMv4=; b=gf6T87cajyn7NpEe3PvVXsLdZ2a13MYde78uaovito6X9TL/PXUNCxyubcLUbO2iTX ebSSyAV5bIIuFjl0BNbsCEGhRc2FugzQLAw7vFN5IqerHrwc/GvoqSrue+1wja6oQ3II wC4uEpaKwwNukr9Uznsn5KLuRu6GfW+YIaHzK0epkjOjbpIShO+r1unR/yYdzPS8ejfe eO2GxuX2V3b+3dWj4biMqVr+xl0aieUwBgyxjKYSyjbJPPPW5S0BcQD/zcRL5Jlrc+me ZpeTySkFonB/oX69C0PaTpsZ5aa/0xkOs0qaGfcLyCzdJE6Oc+SDuyf8O0i7ddVsmHbD YOfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X5kzgyNr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o22-20020a170906861600b0073d54c8792asi1314082ejx.459.2022.08.19.17.41.27; Fri, 19 Aug 2022 17:41:56 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X5kzgyNr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245540AbiHTAkw (ORCPT + 99 others); Fri, 19 Aug 2022 20:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245710AbiHTAkf (ORCPT ); Fri, 19 Aug 2022 20:40:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E9FA113DF2 for ; Fri, 19 Aug 2022 17:40:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 39BB9B829A0 for ; Sat, 20 Aug 2022 00:40:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC6EDC433D6; Sat, 20 Aug 2022 00:40:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660956032; bh=Jq/31toTBgAKQQbUL07ibEi8mCofG0AbmDhRDO/xawU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X5kzgyNrqk3wakHwnP0EnuAGlxdHs4XnEd4o7k2sGVKH/puZavaOuCcbBeFY06u6C OKCW8FIMeEtAJ2vKCgUbT3USrUjxqkkDcPwOe/f0qrJ8HFqzVbyPvTiMlBOd7f/1Jd yWINXa3/jzeMGm6tC2bIi8D3BKLJcbzggeURIHTu1o6eVHZtVnk+iC3xzo+aCt8o6e ZW1PRvR1nnSptn3kQ6fn5J2ZIxQQRAU19FynmciQzOOKUuKFrFM64awtKl8cFuQsXD N2YHw1d38vsi1pAtWUDPe7qp0JOIchbfldnvrtg2BjzzER3h8TxoSg0g/IL1EiEZPX OnqNR+jDdXLBQ== Date: Fri, 19 Aug 2022 17:40:30 -0700 From: Eric Biggers To: "Elliott, Robert (Servers)" Cc: Herbert Xu , "tim.c.chen@linux.intel.com" , "davem@davemloft.net" , "linux-crypto@vger.kernel.org" , "Kani, Toshi" , "Wright, Randy (HPE Servers Linux)" Subject: Re: [PATCH] crypto: testmgr - don't generate WARN for missing modules Message-ID: References: <20220813231443.2706-1-elliott@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Sat, Aug 20, 2022 at 12:15:41AM +0000, Elliott, Robert (Servers) wrote: > Per Stephan, it sounds like this was a hacky way to get some/most of > the modules loaded. > > It'd be good if there was a way to run all registered tests on all > available modules, not just the ones that someone remembered to put > in tcrypt.c. Most algorithms can be allocated via a userspace program using AF_ALG. The only exception is algorithm types that AF_ALG doesn't support. > I do worry this WARN() isn't really helpful even for real self-test > failures - it's dumping the call trace to alg_test(), not the > trace to whatever crypto function alg_test called that is failing. > With Linus always expressing concern with too many BUG and WARN > calls, it might be better as just pr_warn() or pr_err(). It's very helpful because WARN is the standard way for the kernel to report that a kernel bug has been encountered. A test failure is a kernel bug. The stack trace printed by WARN indeed isn't useful here, as it will always be the same. But it's just a side effect. The important things here are that a WARN is triggered at all, and that some log messages that describe what failed are printed. - Eric