+ disable-lock-debugging-when-kernel-state-becomes-untrusted.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     lockdep: disable lock debugging when kernel state becomes untrusted

has been added to the -mm tree.  Its filename is

     disable-lock-debugging-when-kernel-state-becomes-untrusted.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: lockdep: disable lock debugging when kernel state becomes untrusted
From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/panic.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN kernel/panic.c~disable-lock-debugging-when-kernel-state-becomes-untrusted kernel/panic.c
--- a/kernel/panic.c~disable-lock-debugging-when-kernel-state-becomes-untrusted
+++ a/kernel/panic.c
@@ -172,6 +172,7 @@ const char *print_tainted(void)
 
 void add_taint(unsigned flag)
 {
+	debug_locks_off(); /* can't trust the integrity of the kernel anymore */
 	tainted |= flag;
 }
 EXPORT_SYMBOL(add_taint);
@@ -256,6 +257,7 @@ int oops_may_print(void)
  */
 void oops_enter(void)
 {
+	debug_locks_off(); /* can't trust the integrity of the kernel anymore */
 	do_oops_enter_exit();
 }
 
_

Patches currently in -mm which might be from arjan@xxxxxxxxxxxxxxx are

origin.patch
improve-lockdep-debug-output.patch
lockdep-core-reduce-per-lock-class-cache-size.patch
put-a-comment-at-register_die_notifier-that-the-export-is-used.patch
git-acpi.patch
lockdep-annotate-8390c-disable_irq-2.patch
lockdep-fix-sk_dst_check-deadlock.patch
lockdep-split-the-skb_queue_head_init-lock-class.patch
fix-deadlock-in-the-bluetooth-l2cap-layer.patch
sleazy-fpu-feature-x86_64-support.patch
sleazy-fpu-feature-i386-support.patch
disable-lock-debugging-when-kernel-state-becomes-untrusted.patch
delay-accounting-taskstats-interface-send-tgid-once.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux