Mailinglist Archive: opensuse-programming (98 mails)

< Previous Next >
Re: [suse-programming-e] unsupported module, tainting kernel
  • From: Jerry Feldman <gaf@xxxxxxx>
  • Date: Tue, 10 May 2005 09:26:21 -0400
  • Message-id: <200505100926.21680.gaf@xxxxxxx>
On Tuesday 10 May 2005 1:31 am, Pierre Patino wrote:

> As I said in the original message, I already have set
> MODULE_LICENSE("GPL"). I also set MODULE_LICENSE(). Hower,
> /var/log/messages still tells me that the kernel is tainted. Is this
> because I'm using insmod instead of letting the kernel deal with the
> modules via the modules.conf file?
I reproduced your problem. the MODULE_LICENSE macro should prevent the
tainting message.
I created a simple hello world module:
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>

MODULE_LICENSE("GPL");

static int hello_init(void)
{
printk("Hello World!\n");
return 0;
}

static void hello_exit(void)
{
printk("Good bye!\n");
}

module_init(hello_init);
module_exit(hello_exit);

-----------
KDIR:=/lib/modules/$(shell uname -r)/build

obj-m:=hello.o

default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
$(RM) .*.cmd *.o *.ko -r .tmp*

Then, insmod hello.ko
May 10 09:18:07 sauron kernel: module hello unsupported by SUSE/Novell,
tainting kernel.
May 10 09:18:07 sauron kernel: Hello World!



--
Jerry Feldman <gaf@xxxxxxx>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9

< Previous Next >