From 049e88b5254fa14b8011597cd3531703433bc0a9 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Mon, 14 Jul 2025 16:30:13 -0500 Subject: [PATCH] linuxkm/module_hooks.c: use MODULE_LICENSE("GPL"). --- linuxkm/module_hooks.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/linuxkm/module_hooks.c b/linuxkm/module_hooks.c index e924e8205..b902e8257 100644 --- a/linuxkm/module_hooks.c +++ b/linuxkm/module_hooks.c @@ -23,7 +23,9 @@ #include -#define WOLFSSL_LICENSE "GPL v2" +#ifndef WOLFSSL_LICENSE + #define WOLFSSL_LICENSE "GPL" +#endif #ifdef WOLFCRYPT_ONLY #include @@ -424,7 +426,18 @@ static void wolfssl_exit(void) module_exit(wolfssl_exit); -MODULE_LICENSE(WOLFSSL_LICENSE); +#if defined(LINUXKM_LKCAPI_REGISTER) || !defined(WOLFSSL_NO_ASM) + /* When registering algorithms with crypto_register_skcipher() and friends, + * or using kernel_fpu_begin_mask() and _end() to wrap vector register + * usage, we use a "GPL" license unconditionally here to meet the GPL-only + * requirements for those calls, satisfying license_is_gpl_compatible() (see + * /usr/src/linux/include/linux/license.h). + */ + MODULE_LICENSE("GPL"); +#else + MODULE_LICENSE(WOLFSSL_LICENSE); +#endif + MODULE_AUTHOR("https://www.wolfssl.com/"); MODULE_DESCRIPTION("libwolfssl cryptographic and protocol facilities"); MODULE_VERSION(LIBWOLFSSL_VERSION_STRING);