Skip to content

Commit

Permalink
kernel-hacking: move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE
Browse files Browse the repository at this point in the history
They are both memory debug options to debug kernel stack issues.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Changbin Du <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Tested-by: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
changbindu authored and torvalds committed Dec 7, 2019
1 parent f43a289 commit dc9b963
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,18 @@ config DEBUG_STACK_USAGE

This option will slow down process creation somewhat.

config SCHED_STACK_END_CHECK
bool "Detect stack corruption on calls to schedule()"
depends on DEBUG_KERNEL
default n
help
This option checks for a stack overrun on calls to schedule().
If the stack end location is found to be over written always panic as
the content of the corrupted region can no longer be trusted.
This is to ensure no erroneous behaviour occurs which could result in
data corruption or a sporadic crash at a later stage once the region
is examined. The runtime overhead introduced is minimal.

config DEBUG_VM
bool "Debug VM"
depends on DEBUG_KERNEL
Expand Down Expand Up @@ -985,18 +997,6 @@ config SCHEDSTATS
application, you can say N to avoid the very slight overhead
this adds.

config SCHED_STACK_END_CHECK
bool "Detect stack corruption on calls to schedule()"
depends on DEBUG_KERNEL
default n
help
This option checks for a stack overrun on calls to schedule().
If the stack end location is found to be over written always panic as
the content of the corrupted region can no longer be trusted.
This is to ensure no erroneous behaviour occurs which could result in
data corruption or a sporadic crash at a later stage once the region
is examined. The runtime overhead introduced is minimal.

config DEBUG_TIMEKEEPING
bool "Enable extra timekeeping sanity checking"
help
Expand Down

0 comments on commit dc9b963

Please sign in to comment.