Re: [PATCH 6/7] lib: Give XOR_BLOCKS, RAID6_PQ config opts names

From: dan.j.williams
Date: Wed Oct 08 2025 - 18:50:16 EST


Kent Overstreet wrote:
> Give these config options names so that they show up under the "Library
> routes" kernel configuration menu, and can be enabled by distributions.

A distribution specifies a kernel configuration. A distribution that
ships a given out-of-tree module can arrange for all its dependencies to
be met.

> These are needed for bcachefs to be built out of tree.
>
> These libraries are both for RAID5/6.
>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Eric Biggers <ebiggers@xxxxxxxxxx>
> Signed-off-by: Kent Overstreet <kent.overstreet@xxxxxxxxx>
> ---
> crypto/Kconfig | 2 +-
> lib/Kconfig | 4 +++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/crypto/Kconfig b/crypto/Kconfig
> index 23bd98981ae8..da4f072abae0 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -3,7 +3,7 @@
> # Generic algorithms support
> #
> config XOR_BLOCKS
> - tristate
> + tristate "Accelerated block xor algorithm"

For example, the approach taken with the CXL unit test modules in
tools/testing/ is to have them assert all their dependencies.
Specifically, tools/testing/cxl/config_check.c validates the test
environment rather than giving the out-of-tree module the ability to
select symbols.

Now in this specific case of XOR_BLOCKS, if a distribution really wants
CONFIG_XOR_BLOCKS=n in its main config *and* wants to ship an
out-of-tree module that depends on CONFIG_XOR_BLOCKS=m, then that
distribution needs to provide an xor.ko to meet that dependency. Not
make upstream carry a patch to make that symbol configurable with no
upstream consumer.

tools/testing/cxl/Kbuild is an example of building a set of in-tree
modules as out-of-tree modules.