public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: "Elliott, Robert (Servers)" <elliott@hpe.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"Kani, Toshi" <toshi.kani@hpe.com>,
	"Wright, Randy (HPE Servers Linux)" <rwright@hpe.com>
Subject: Re: [PATCH] crypto: testmgr - don't generate WARN for missing modules
Date: Fri, 19 Aug 2022 17:40:30 -0700	[thread overview]
Message-ID: <YwAtfgc3ftCp3Joy@sol.localdomain> (raw)
In-Reply-To: <MW5PR84MB1842130E7FA4D064D50DC1EDAB6F9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM>

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

      reply	other threads:[~2022-08-20  0:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13 23:14 [PATCH] crypto: testmgr - don't generate WARN for missing modules Robert Elliott
2022-08-15 21:30 ` Eric Biggers
2022-08-16  2:43   ` Herbert Xu
2022-08-16  5:09     ` Stephan Mueller
2022-08-16  5:49       ` Herbert Xu
2022-08-19 11:05 ` Herbert Xu
2022-08-19 23:15   ` Eric Biggers
2022-08-20  0:15     ` Elliott, Robert (Servers)
2022-08-20  0:40       ` Eric Biggers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YwAtfgc3ftCp3Joy@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=davem@davemloft.net \
    --cc=elliott@hpe.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=rwright@hpe.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=toshi.kani@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox