Re: Linux 2.4.9-ac5

Keith Owens
2001-08-31T01:48:52Z

On Fri, 31 Aug 2001 02:26:09 +0100 (BST),
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> What do you need for licence support in modutils? Obviously modinfo
>> needs to print it, but what about insmod? Should insmod issue warning
>> messages for proprietary modules? What about ksymoops? IOW, what was
>> the reason for adding MODULE_LICENSE?
>
>My goal is to eventually include the info tucked away on oops report lines
>so that I can automatically dump bug reports with binary drivers, including
>the growing number of people who lie about nvdriver and think that this will
>get their bug cured.

Then we have a problem. The modinfo and modstring sections are not
loaded into kernel space, they are processed by insmod then discarded.

Solution: /proc/sys/kernel/tainted. Set to 0 on boot, set to 1 by
insmod when it finds a non-GPL module, printed by panic, extracted by
ksymoops. Any load of a proprietary module taints the kernel, even if
it is later removed. The kernel code for that sysctl only allows taint
to be set, not to be cleared.

Not perfect, really malicious users can hack the kernel. Or they can
simply edit the taint flag in the oops report. But it will catch 90%+
of the problem case.