lkml.org 
[lkml]   [2004]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Fw: signed kernel modules?

> On Fri, 15 Oct 2004, Chris Friesen wrote:
>
>> Greg KH wrote:
>>
>>> If you have a BSD licensed module, you do not have to provide the source
>>> code for it.
>>
>> Maybe we need a "BSD with source" module string that doesn't taint? Or is
>> that getting too ridiculous?
>>
>> Chris

If the whole module license issue is truly one of being able
to review the source, then certainly nobody would fear the
inclusion of a "PUBLIC" license string. This would fit the
broad classification of publicly-available sources, not
necessarily just in the "Public domain". For instance, when
a company puts the sources for some driver on it's Web Page,
but doesn't want to have anything to do with Mr. Stallman.

Here is a patch. I also added an array containing, possibly
more in the future, acceptable strings.



--- linux-2.6.8/kernel/module.c.orig 2004-10-18 08:21:28.000000000 -0400
+++ linux-2.6.8/kernel/module.c 2004-10-18 08:37:19.000000000 -0400
@@ -48,6 +48,18 @@
#define ARCH_SHF_SMALL 0
#endif

+/*
+ * List of acceptable module-license strings.
+ */
+static const char *licok[]= {
+ "GPL",
+ "GPL v2",
+ "CPL and additional rights",
+ "Dual BSD/GPL",
+ "Dual MPL/GPL",
+ "PUBLIC" };
+
+
/* If this is set, the section belongs in the init part of the module */
#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))

@@ -1362,11 +1374,11 @@

static inline int license_is_gpl_compatible(const char *license)
{
- return (strcmp(license, "GPL") == 0
- || strcmp(license, "GPL v2") == 0
- || strcmp(license, "GPL and additional rights") == 0
- || strcmp(license, "Dual BSD/GPL") == 0
- || strcmp(license, "Dual MPL/GPL") == 0);
+ size_t i;
+ for(i=0; i < sizeof(licok) / sizeof(licok[0]); i++)
+ if(strcmp(license, licok[i]) == 0)
+ return 1;
+ return 0;
}

static void set_license(struct module *mod, const char *license)

Cheers,
Dick Johnson
Penguin : Linux version 2.6.8 on an i686 machine (5537.79 BogoMips).
Note 96.31% of all statistics are fiction.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.529 / U:0.068 seconds]
©2003-2014 Jasper Spaans. Advertise on this site