Skip to content

Commit

Permalink
debug: Do not permit CONFIG_DEBUG_STACK_USAGE=y on IA64 or PARISC
Browse files Browse the repository at this point in the history
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 <[email protected]> (failed allmodconfig build)
Signed-off-by: Tony Luck <[email protected]>
  • Loading branch information
aegl committed Jul 19, 2012
1 parent f28fa72 commit e9c31b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,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.
Expand Down

0 comments on commit e9c31b3

Please sign in to comment.