lkml.org 
[lkml]   [2003]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: Driver Model
On Wed, 3 Sep 2003, Stuart MacDonald wrote:

> From: linux-kernel-owner@vger.kernel.org
> > [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of
> > Richard B. Johnson
> > sources are available. If the driver does not contain the appropriate
> > MODULE_LICENSE() string, then several tools will show "tainted" so
>
> If the MODULE_LICENSE() macro is what determines taint, what's to
> prevent a company from compiling their driver in their own kernel tree
> with that macro and releasing it binary-only? Wouldn't that module
> then be taint-free?
>
> ..Stu
>

Well yes! You can do:

File: License.c
/*
*
* Everything in this file (only) is released under the so-called
* GNU Public License, incorporated herein by reference.
*
* Now, we just link this with any proprietary code and everybody
* but the lawyers are happy.
*/
#ifndef __KERNEL__
#define __KERNEL__
#endif
#ifndef MODULE
#define MODULE
#endif
#include <linux/module.h>
#if defined(MODULE_LICENSE)
MODULE_LICENSE("GPL");
#endif

You can link the output of this file with the binary-only file
and get rid of the 'tainted' message.

gcc -I./usr/src/linux/`uname-r` -o license.o License.c
ld -i -o driver.o binary.o license.o

....bbuutttt.... Now, if the kernel gets dorked because
a binary-only module is broken, the binary-only module will
not get fixed! The kernel developers need to know if the
source-code is available for everything that's in the kernel
when the kernel croaks. They need to examine the code of
every suspect module as well as the kernel code in the area
of interest. Note that a module inside the kernel is free to
destroy __everything__. A wild pointer in user-mode just
seg-faults, in kernel mode it can scribble over your hard-
disk and you won't even know it until you try to edit your
movie script that you've been working on for 20 years.

Currently, once an oops is reported and developers see the
'tainted' message, they ask the reporter to remove the module
that is producing that message. If the machine can't run without
it, they ask the person to get the help of the module provider.
Often "ask" is not too kind. Usually, it's a snide remark
by persons who are not trained in public affairs so this
may tend to cause some friction. However, remember that the
wizards that gave a lot of their time and effort to kernel
development don't really like to have some secret module
screwing up their work.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 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 13:48    [W:0.126 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site