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