A recent patch by Ted Ts'o
expands the taint concept in an interesting way. It adds a new file
(/proc/sys/kernel/tainted); should user space write to that file,
the kernel will be marked tainted with the new "U" flag. The
idea, says Ted, is to flag "when userspace is potentially doing
something naughty that might compromise the kernel.
" It took a few
more questions before the real
truth of the matter came out:
The idea of using SELinux on a system where Java code is free to mess around with physical memory does involve a fair amount of cognitive dissonance. But The Customer Is Always Right, so Ted is making this work. Not entirely willingly, though:
Nobody has stepped forward to say that the kernel should not be tainted in such a situation. Instead, one might almost be able to merge a patch causing the kernel to emit scary horror-movie sounds as well.
There appears to be general agreement that this patch makes sense;
certainly there are plenty of situations where user-space actions might
affect the stability of the system. There was one request for a log
message to be stored with the user-space taint flag so that the reason for
its presence would be more clear later on. A concern was also raised that
some distributions were using the "U" flag for other reasons (to
flag the presence of "unsupported" modules), though it is not clear that
this is actually happening. Collisions over the use of taint flags could
indeed create confusion, so Dave Jones has suggested that any taint flags
used in out-of-tree code should at least be documented with a comment in
the mainline kernel. Whether any such flags exist remains to be seen,
however.
| Index entries for this article | |
|---|---|
| Kernel | Tainting |