diff --git a/crypto/fips140-defs.h b/crypto/fips140-defs.h index 9005f9513308..d3f62e3c3f37 100644 --- a/crypto/fips140-defs.h +++ b/crypto/fips140-defs.h @@ -17,9 +17,9 @@ * related macros to be expanded as they would be for built-in code; e.g., * module_init() adds the function to the .initcalls section of the binary. * - * The .c file that contains the real module_init() for fips140.ko is then - * responsible for redefining MODULE, and the real module_init() is responsible - * for executing all the initcalls that were collected into .initcalls. + * The .c files that contain the real module_init, module license, and module + * parameters for fips140.ko are then responsible for redefining MODULE. The + * real module_init executes all initcalls that were collected into .initcalls. */ #undef MODULE diff --git a/crypto/fips140-eval-testing.c b/crypto/fips140-eval-testing.c index ea3cd653983a..fdc786884d11 100644 --- a/crypto/fips140-eval-testing.c +++ b/crypto/fips140-eval-testing.c @@ -20,6 +20,14 @@ __inline_maybe_unused notrace #undef BUILD_FIPS140_KO +/* + * Since this .c file contains real module parameters for fips140.ko, it needs + * to be compiled normally, so undo the hacks that were done in fips140-defs.h. + */ +#define MODULE +#undef KBUILD_MODFILE +#undef __DISABLE_EXPORTS + #include #include #include