From: Pavel Roskin <proski@gnu.org>
To: Jon Masters <jonathan@jonmasters.org>
Cc: Andi Kleen <andi@firstfloor.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Giridhar Pemmasani <pgiri@yahoo.com>
Subject: Re: ndiswrapper and GPL-only symbols redux
Date: Wed, 30 Jan 2008 00:26:45 -0500 [thread overview]
Message-ID: <1201670805.4382.4.camel@rd> (raw)
In-Reply-To: <20080130050721.GB22444@dallas.jonmasters.org>
On Wed, 2008-01-30 at 05:07 +0000, Jon Masters wrote:
> *). Add a new taint?
> *). Move it later?
>
> It's all trivial, but a policy should be established for the future.
I'd prefer a new taint. It's less likely to break. It provides more
information in the stack dumps. It makes it clear the difference
ndiswrapper and driverloader.
Here's the patch:
---
Introduce a new taint flag for ndiswrapper
Although ndiswrapper loads proprietary code, it's under GPL itself.
Introduce a different taint flag for this case, so that ndiswrapper
retains access to GPL-only symbols.
Add comments to show the difference between driverloader and
ndiswrapper.
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
include/linux/kernel.h | 1 +
kernel/module.c | 5 ++++-
kernel/panic.c | 2 ++
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a7283c9..861a6ae 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -240,6 +240,7 @@ extern enum system_states {
#define TAINT_BAD_PAGE (1<<5)
#define TAINT_USER (1<<6)
#define TAINT_DIE (1<<7)
+#define TAINT_BLOB_WRAPPER (1<<8)
extern void dump_stack(void) __cold;
diff --git a/kernel/module.c b/kernel/module.c
index f6a4e72..a64380c 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1925,8 +1925,11 @@ static struct module *load_module(void __user *umod,
/* Set up license info based on the info section */
set_license(mod, get_modinfo(sechdrs, infoindex, "license"));
+ /* GPL, but may load proprietary code */
if (strcmp(mod->name, "ndiswrapper") == 0)
- add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
+ add_taint_module(mod, TAINT_BLOB_WRAPPER);
+
+ /* Wrongly claims to be under GPL */
if (strcmp(mod->name, "driverloader") == 0)
add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
diff --git a/kernel/panic.c b/kernel/panic.c
index da4d6ba..b040812 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -152,6 +152,7 @@ EXPORT_SYMBOL(panic);
* 'M' - System experienced a machine check exception.
* 'B' - System has hit bad_page.
* 'U' - Userspace-defined naughtiness.
+ * 'W' - Wrapper for untrusted binary blobs has been loaded.
*
* The string is overwritten by the next call to print_taint().
*/
@@ -162,6 +163,7 @@ const char *print_tainted(void)
if (tainted) {
snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c",
tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
+ tainted & TAINT_BLOB_WRAPPER ? 'W' : ' ',
tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
tainted & TAINT_FORCED_RMMOD ? 'R' : ' ',
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2008-01-30 5:26 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-29 21:22 ndiswrapper and GPL-only symbols redux Pavel Roskin
2008-01-29 22:27 ` Valdis.Kletnieks
2008-01-29 22:35 ` Giridhar Pemmasani
2008-01-29 23:21 ` Pavel Roskin
2008-01-30 0:25 ` Jon Masters
2008-01-29 22:45 ` Alan Cox
2008-01-29 23:56 ` Pavel Roskin
2008-01-30 3:24 ` Andi Kleen
2008-01-30 5:07 ` Jon Masters
2008-01-30 5:26 ` Pavel Roskin [this message]
2008-01-30 6:03 ` Andi Kleen
2008-01-30 6:12 ` Pavel Roskin
2008-01-29 22:57 ` Adrian Bunk
2008-01-29 23:04 ` Alan Cox
2008-01-29 23:06 ` Jan Engelhardt
2008-01-29 23:25 ` Måns Rullgård
2008-01-30 0:35 ` Adrian Bunk
2008-01-30 0:46 ` Måns Rullgård
2008-01-30 1:44 ` Daniel Hazelton
2008-01-30 7:38 ` Geert Uytterhoeven
2008-01-30 8:45 ` Måns Rullgård
2008-01-30 21:00 ` David Schwartz
2008-01-29 23:44 ` Pavel Roskin
2008-01-30 0:25 ` Adrian Bunk
2008-01-30 2:02 ` Pavel Roskin
2008-01-30 11:24 ` Rusty Russell
2008-01-30 17:54 ` Adrian Bunk
2008-01-30 18:15 ` Lennart Sorensen
2008-01-30 18:45 ` Adrian Bunk
2008-01-30 19:43 ` Lennart Sorensen
2008-01-30 20:26 ` Valdis.Kletnieks
2008-01-30 21:09 ` Adrian Bunk
[not found] ` <E1JKJvh-0006P8-Pi@fencepost.gnu.org>
2008-02-01 5:08 ` Pavel Roskin
2008-02-06 10:50 ` Adrian Bunk
2008-02-06 11:11 ` Xavier Bestel
2008-02-06 11:38 ` David Schwartz
2008-02-06 15:10 ` Theodore Tso
2008-01-30 0:48 ` Giridhar Pemmasani
2008-01-30 17:54 ` Adrian Bunk
2008-01-30 18:26 ` Chris Friesen
2008-01-30 18:54 ` Adrian Bunk
2008-01-30 19:36 ` Lee Revell
2008-01-30 20:28 ` Adrian Bunk
2008-01-31 1:00 ` Michael Gerdau
2008-02-05 13:00 ` Adrian Bunk
2008-02-04 12:42 ` Alan Cox
2008-02-04 13:56 ` Adrian Bunk
2008-01-31 3:25 ` David Newall
2008-01-31 15:20 ` Chris Friesen
2008-01-30 0:20 ` Jon Masters
2008-01-30 0:35 ` Jan Engelhardt
2008-01-30 0:48 ` Jon Masters
2008-01-30 1:33 ` Pavel Roskin
2008-01-30 1:48 ` Pavel Roskin
2008-01-30 2:08 ` Jan Engelhardt
2008-01-30 5:04 ` Jon Masters
2008-01-30 5:38 ` Zan Lynx
2008-01-30 7:40 ` Geert Uytterhoeven
2008-01-30 8:54 ` Måns Rullgård
2008-01-30 20:50 ` David Schwartz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1201670805.4382.4.camel@rd \
--to=proski@gnu.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=jonathan@jonmasters.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgiri@yahoo.com \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.