unsupported module, tainting kernel

Yes this is an old topic. I've read everything I could find including the README.SUSE file and couldn't find the straight answer to this question: How do I get rid of this message when I write a plain-vanilla "hello world" loadable module? MODULE_LICENSE is set to "GPL". I eventually want to release this module and don't want to jam a "2" into /proc/sys/kernel/unsupported. What's missing in the source code? TIA&Cheers

On Sunday 08 May 2005 12:27 am, Pierre Patino wrote:
Yes this is an old topic. I've read everything I could find including the README.SUSE file and couldn't find the straight answer to this question: How do I get rid of this message when I write a plain-vanilla "hello world" loadable module? MODULE_LICENSE is set to "GPL". I eventually want to release this module and don't want to jam a "2" into /proc/sys/kernel/unsupported. What's missing in the source code? TIA&Cheers Try inserting this into your course code below the includes. MODULE_LICENSE("GPL"); MODULE_AUTHOR("Pierre Patino");
-- Jerry Feldman <gaf@blu.org> 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

Jerry Feldman wrote:
On Sunday 08 May 2005 12:27 am, Pierre Patino wrote:
Yes this is an old topic. I've read everything I could find including the README.SUSE file and couldn't find the straight answer to this question: How do I get rid of this message when I write a plain-vanilla "hello world" loadable module? MODULE_LICENSE is set to "GPL". I eventually want to release this module and don't want to jam a "2" into /proc/sys/kernel/unsupported. What's missing in the source code? TIA&Cheers
Try inserting this into your course code below the includes. MODULE_LICENSE("GPL"); MODULE_AUTHOR("Pierre Patino");
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?

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@blu.org> 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
participants (2)
-
Jerry Feldman
-
Pierre Patino