Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting message "module license 'unspecified' taints kernel " despite setting MODULE_LICENSE

I'm currently trying to run a kernel module. This module seems to work fine on various Linux machines, however, when I attempt to run it on a specific machine (namely, CentOS with a kernel version of 2.6), the module fails to start, claiming that I haven't set a module license, and, as a result, not allowing me to use various necessary kernel APIs.

I have set MODULE_LICENSE("GPL") in the bottom of my main source file (the one that contains module_init and module_exit), and as far as all the examples I could find say, that's enough. I should note that my project has multiple files.

I'm kind of stumped, so any help would be appreciated.

like image 610
Ori Osherov Avatar asked May 29 '13 08:05

Ori Osherov


2 Answers

For a start, verify that the license info is present in your module object file.

objdump -sj.modinfo yourModule.ko

like image 168
Armali Avatar answered Sep 18 '22 17:09

Armali


I just encountered the same issue, which was fixed only after I wrote MODULE_LICENSE("GPL") at the beginning (after the includes) of every c file which the module's makefile is referring to.

like image 42
Yoav Feuerstein Avatar answered Sep 18 '22 17:09

Yoav Feuerstein