Thread (39 messages) flat view 39 messages, 10 authors, 2022-03-17

Re: [v2 PATCH] crypto: api - Fix built-in testing dependency failures

From: Nathan Chancellor <nathan@kernel.org>
Date: 2021-09-28 18:33:00
Also in: llvm

On Fri, Sep 17, 2021 at 08:26:19AM +0800, Herbert Xu wrote:
When complex algorithms that depend on other algorithms are built
into the kernel, the order of registration must be done such that
the underlying algorithms are ready before the ones on top are
registered.  As otherwise they would fail during the self-test
which is required during registration.

In the past we have used subsystem initialisation ordering to
guarantee this.  The number of such precedence levels are limited
and they may cause ripple effects in other subsystems.

This patch solves this problem by delaying all self-tests during
boot-up for built-in algorithms.  They will be tested either when
something else in the kernel requests for them, or when we have
finished registering all built-in algorithms, whichever comes
earlier.

Reported-by: Vladis Dronov <redacted>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This patch as commit 3cefb01905df ("crypto: api - Fix built-in testing
dependency failures") in -next (along with the follow up fix) causes the
following depmod error:

$ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc-linux- INSTALL_MOD_PATH=rootfs ppc44x_defconfig all modules_install
depmod: ERROR: Cycle detected: crypto -> crypto_algapi -> crypto
depmod: ERROR: Found 2 modules in dependency cycles!
make: *** [Makefile:1946: modules_install] Error 1

Initially reported on our CI:

https://github.com/ClangBuiltLinux/continuous-integration2/runs/3732847295?check_suite_focus=true

Cheers,
Nathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help