I'm seeing:

        ERROR: modpost: module mldsa_kunit uses symbol mldsa_use_hint from 
namespace EXPORTED_FOR_KUNIT_TESTING, but does not import it.

I have this in my .config:

        CONFIG_CRYPTO_LIB_MLDSA=m
        CONFIG_CRYPTO_LIB_MLDSA_KUNIT_TEST=m

The problem appears to be here:

        #if IS_ENABLED(CONFIG_CRYPTO_LIB_MLDSA_KUNIT_TEST)
        /* Allow the __always_inline function use_hint() to be unit-tested. */
        s32 mldsa_use_hint(u8 h, s32 r, s32 gamma2)
        {
                return use_hint(h, r, gamma2);
        }
        EXPORT_SYMBOL_IF_KUNIT(mldsa_use_hint);
        #endif

It works if EXPORT_SYMBOL_IF_KUNIT() is changed to EXPORT_SYMBOL_GPL().

David


Reply via email to