Skip to content

Commit 049e88b

Browse files
committed
linuxkm/module_hooks.c: use MODULE_LICENSE("GPL").
1 parent 2c341a5 commit 049e88b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

linuxkm/module_hooks.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323

2424
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
2525

26-
#define WOLFSSL_LICENSE "GPL v2"
26+
#ifndef WOLFSSL_LICENSE
27+
#define WOLFSSL_LICENSE "GPL"
28+
#endif
2729

2830
#ifdef WOLFCRYPT_ONLY
2931
#include <wolfssl/version.h>
@@ -424,7 +426,18 @@ static void wolfssl_exit(void)
424426

425427
module_exit(wolfssl_exit);
426428

427-
MODULE_LICENSE(WOLFSSL_LICENSE);
429+
#if defined(LINUXKM_LKCAPI_REGISTER) || !defined(WOLFSSL_NO_ASM)
430+
/* When registering algorithms with crypto_register_skcipher() and friends,
431+
* or using kernel_fpu_begin_mask() and _end() to wrap vector register
432+
* usage, we use a "GPL" license unconditionally here to meet the GPL-only
433+
* requirements for those calls, satisfying license_is_gpl_compatible() (see
434+
* /usr/src/linux/include/linux/license.h).
435+
*/
436+
MODULE_LICENSE("GPL");
437+
#else
438+
MODULE_LICENSE(WOLFSSL_LICENSE);
439+
#endif
440+
428441
MODULE_AUTHOR("https://www.wolfssl.com/");
429442
MODULE_DESCRIPTION("libwolfssl cryptographic and protocol facilities");
430443
MODULE_VERSION(LIBWOLFSSL_VERSION_STRING);

0 commit comments

Comments
 (0)