public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] debug: Do not permit CONFIG_DEBUG_STACK_USAGE=y on IA64 or PARISC
@ 2012-07-18 17:35 Tony Luck
  2012-07-25  7:45 ` Ingo Molnar
  2012-07-28  8:12 ` James Bottomley
  0 siblings, 2 replies; 8+ messages in thread
From: Tony Luck @ 2012-07-18 17:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, James E.J. Bottomley, Helge Deller, linux-parisc,
	linux-ia64, Fengguang Wu

The stack_not_used() function in <linux/sched.h> assumes that stacks
grow downwards. This is not true on IA64 or PARISC, so this function
would walk off in the wrong direction and into the weeds.

Found on IA64 because of a compilation failure with recursive dependencies
on IA64_TASKSIZE and IA64_THREAD_INFO_SIZE.

Fixing the code is possible, but should be combined with other
infrastructure additions to set up the "canary" at the end of the stack.

Reported-by: Fengguang Wu <fengguang.wu@intel.com> (failed allmodconfig build)
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index ff5bdee..4a18650 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -714,7 +714,7 @@ config STACKTRACE
 
 config DEBUG_STACK_USAGE
 	bool "Stack utilization instrumentation"
-	depends on DEBUG_KERNEL
+	depends on DEBUG_KERNEL && !IA64 && !PARISC
 	help
 	  Enables the display of the minimum amount of free stack which each
 	  task has ever had available in the sysrq-T and sysrq-P debug output.
-- 
1.7.10.2.552.gaa3bb87


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-28 21:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-18 17:35 [PATCH] debug: Do not permit CONFIG_DEBUG_STACK_USAGE=y on IA64 or PARISC Tony Luck
2012-07-25  7:45 ` Ingo Molnar
2012-07-25  8:02   ` James Bottomley
2012-07-25 18:23     ` Luck, Tony
2012-07-26 12:01     ` Ingo Molnar
2012-07-26 22:17       ` Peter Chubb
2012-07-28  8:12 ` James Bottomley
2012-07-28 21:43   ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox