Re: [PATCH] MODSIGN: Add TAINT_NOKEY_MODULE

Rusty Russell
2013-01-21T01:53:53Z

"Frank Ch. Eigler" <fche@redhat.com> writes:
> Hi -
>
>> [...]
>> - add_taint(TAINT_DIE);
>> + add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
>> [...]
>
> If "UNRELIABLE" a good way to describe it - not DANGEROUS or
> COUNTERPRODUCTIVE or something, then maybe lockdep *can* produce
> reasonable results following such a taint. If the results are merely
> suspect, could lockdep reports include the taint report, but otherwise
> keep working?

git blame is your friend here:

commit 2c16e9c888985761511bd1905b00fb271169c3c0
Author: Arjan van de Ven <arjan@linux.intel.com>
Date: Mon Jul 10 04:45:42 2006 -0700

[PATCH] lockdep: disable lock debugging when kernel state becomes untrusted

Disable lockdep debugging in two situations where the integrity of the
kernel no longer is guaranteed: when oopsing and when hitting a
tainting-condition. The goal is to not get weird lockdep traces that don't
make sense or are otherwise undebuggable, to not waste time.

Lockdep assumes that the previous state it knows about is valid to operate,
which is why lockdep turns itself off after the first violation it reports,
after that point it can no longer make that assumption.

A kernel oops means that the integrity of the kernel compromised; in
addition anything lockdep would report is of lesser importance than the
oops.

All the tainting conditions are of similar integrity-violating nature and
also make debugging/diagnosing more difficult.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Cheers,
Rusty.