lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 29 Mar 2010 11:14:13 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org, paulmck@...ux.vnet.ibm.com,
	laijs@...fujitsu.com, dipankar@...ibm.com, josh@...htriplett.org,
	dvhltc@...ibm.com, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, adobriyan@...il.com,
	"David S. Miller" <davem@...emloft.net>
Subject: [PATCH] rcu head debug consider on stack fixup

Complain if activation receives a non-initialized object on the stack.

[This patch applies after "tree/tiny rcu: Add debug RCU head objects (v5)"]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
CC: David S. Miller <davem@...emloft.net>
CC: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
CC: akpm@...ux-foundation.org
CC: mingo@...e.hu
CC: laijs@...fujitsu.com
CC: dipankar@...ibm.com
CC: josh@...htriplett.org
CC: dvhltc@...ibm.com
CC: niv@...ibm.com
CC: tglx@...utronix.de
CC: peterz@...radead.org
CC: rostedt@...dmis.org
CC: Valdis.Kletnieks@...edu
CC: dhowells@...hat.com
CC: eric.dumazet@...il.com
CC: Alexey Dobriyan <adobriyan@...il.com>
---
 kernel/rcupdate.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Index: linux.trees.git/kernel/rcupdate.c
===================================================================
--- linux.trees.git.orig/kernel/rcupdate.c	2010-03-29 11:05:35.000000000 -0400
+++ linux.trees.git/kernel/rcupdate.c	2010-03-29 11:06:23.000000000 -0400
@@ -179,8 +179,12 @@ static int rcuhead_fixup_activate(void *
 		 * This is not really a fixup. We just make sure that it is
 		 * tracked in the object tracker.
 		 */
-		debug_object_init(head, &rcuhead_debug_descr);
-		debug_object_activate(head, &rcuhead_debug_descr);
+		if (!object_is_on_stack(head)) {
+			debug_object_init(head, &rcuhead_debug_descr);
+			debug_object_activate(head, &rcuhead_debug_descr);
+			return 0;
+		}
+		WARN_ON_ONCE(1);
 		return 0;
 
 	case ODEBUG_STATE_ACTIVE:
-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ