[PATCH] Re: Non-standard MODULE_LICENSEs in 2.4.13-ac2

Riley Williams
2001-10-28T11:16:05Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1712 bytes --]

Hi Peter.

> I think the idea of making a standard set of macros available is a
> good idea for two reasons:
>
> a) It avoids mispellings;
>
> b) It makes it possible to apply standard definitions to the
> codified strings.

For reference, here's a summary of the strings in the 2.4.13 kernel
tarball as distributed, counted using `sort | uniq -c` to avoid spam:

6 MODULE_LICENSE("BSD without advertisement clause")
22 MODULE_LICENSE("BSD without advertising clause")
1 MODULE_LICENSE("BSD")
8 MODULE_LICENSE("Dual BSD/GPL")
15 MODULE_LICENSE("Dual MPL/GPL")
2 MODULE_LICENSE("GPL and additional rights")
1 MODULE_LICENSE("GPL v2")
912 MODULE_LICENSE("GPL")

Note particularly the line...

1 MODULE_LICENSE("GPL v2")

...which indicates that drivers/net/pcmcia/xircom_tulip_cb.c is regarded
as tainting the kernel - this string is NOT one of the ones that are
accepted as untainted. Is this reasonable?

The enclosed patch first moves the license definitions to a new header
file linux/license.h and then defines standard macros (with the ML_
prefix) for each of the above strings in standardised form, with dual
licenses listed in alphabetical order. It does NOT change any of the
uses of the MODULE_LICENSE macro, but if I get confirmation that this
patch is accepted into the kernel source tree, I'll go through the
kernel and tweak them all to match it.

Here's the definitions used for the above, in the same order.

ML_BSD_NO_AD
ML_BSD_NO_AD
ML_BSD
ML_BSD_GPL
ML_GPL_MPL
ML_GPL_PLUS
ML_GPL_V2
ML_GPL

You will note that the first two have been merged into a single
definition, as they are reasonably clearly the same license.

Best wishes from Riley.

[-- Attachment #2: Standardise module licenses --]
[-- Type: TEXT/PLAIN, Size: 3231 bytes --]

--- linux-2.4.13/include/linux/license.h~ Thu Jan 1 00:00:00 1970
+++ linux-2.4.13/include/linux/license.h Sun Oct 28 10:58:21 2001
@@ -0,0 +1,49 @@
+/*
+ * Module license declarations.
+ *
+ * Rewritten by Riley Williams <rhw@MemAlpha.cx> Oct 2001
+ */
+
+#ifndef _LINUX_MODULE_LICENSE_H
+#define _LINUX_MODULE_LICENSE_H
+
+/*
+ * The following standard license identities are defined.
+ */
+
+#define ML_BSD "BSD"
+#define ML_BSD_NO_AD "BSD without advertisement clause"
+#define ML_BSD_GPL "BSD/GPL"
+#define ML_GPL "GPL"
+#define ML_GPL_MPL "GPL/MPL"
+#define ML_GPL_PLUS "GPL and additional rights"
+#define ML_GPL_V2 "GPL version 2 only"
+
+#define ML_PROPRIETARY "Proprietary"
+
+/*
+ * Of these, the following are currently accepted as indicating free software
+ * modules.
+ *
+ * ML_BSD_GPL
+ * ML_GPL
+ * ML_GPL_MPL
+ * ML_GPL_PLUS
+ * ML_GPL_V2 (Should be, but currently isn't)
+ *
+ * There are dual licensed components, but when running with Linux it is the
+ * GPL that is relevant so this is a non issue. Similarly LGPL linked with
+ * GPL is a GPL combined work.
+ *
+ * This exists for several reasons
+ * 1. So modinfo can show license info for users wanting to vet their setup
+ * is free
+ * 2. So the community can ignore bug reports including proprietary modules
+ * 3. So vendors can do likewise based on their own policies
+ */
+
+#define MODULE_LICENSE(license) \
+static const char __module_license[] __attribute__((section(".modinfo"))) = \
+"license=" license
+
+#endif /* _LINUX_MODULE_H */
--- linux-2.4.13/include/linux/module.h~ Sat Oct 27 20:42:32 2001
+++ linux-2.4.13/include/linux/module.h Sun Oct 28 10:59:38 2001
@@ -24,6 +24,8 @@

#include <asm/atomic.h>

+#include <linux/license.h>
+
/* Don't need to bring in all of uaccess.h just for this decl. */
struct exception_table_entry;

@@ -259,34 +261,6 @@
__attribute__ ((unused)) = name
#define MODULE_DEVICE_TABLE(type,name) \
MODULE_GENERIC_TABLE(type##_device,name)
-
-/*
- * The following license idents are currently accepted as indicating free
- * software modules
- *
- * "GPL" [GNU Public License v2 or later]
- * "GPL and additional rights" [GNU Public License v2 rights and more]
- * "Dual BSD/GPL" [GNU Public License v2 or BSD license choice]
- * "Dual MPL/GPL" [GNU Public License v2 or Mozilla license choice]
- *
- * The following other idents are available
- *
- * "Proprietary" [Non free products]
- *
- * There are dual licensed components, but when running with Linux it is the
- * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
- * is a GPL combined work.
- *
- * This exists for several reasons
- * 1. So modinfo can show license info for users wanting to vet their setup
- * is free
- * 2. So the community can ignore bug reports including proprietary modules
- * 3. So vendors can do likewise based on their own policies
- */
-
-#define MODULE_LICENSE(license) \
-static const char __module_license[] __attribute__((section(".modinfo"))) = \
-"license=" license

/* Define the module variable, and usage macros. */
extern struct module __this_module;