Skip to contentSkip to conversation

x86/unwind_guess: Prevent using UNWINDER_GUESS=y with STACKDEPOT=y

PATCH In review Andrey Ryabinin 4 participants 4 messages Nov 30, 2017 – Dec 12, 2017 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/unwind_guess: Prevent using UNWINDER_GUESS=y with STACKDEPOT=y

Stackdepot doesn't work well with CONFIG_UNWINDER_GUESS=y. The 'guess' unwinder generate awfully large and inaccurate stacktraces, thus stackdepot can't deduplicate stacktraces because they all look like unique. Eventually stackdepot reaches its capacity limit:

WARNING: CPU: 0 PID: 545 at lib/stackdepot.c:119 depot_save_stack+0x28e/0x550
Call Trace:
 ? kasan_kmalloc+0x144/0x160
 ? depot_save_stack+0x1f5/0x550
 ? do_raw_spin_unlock+0xda/0xf0
 ? preempt_count_sub+0x13/0xc0

<...90 lines...>

? do_raw_spin_unlock+0xda/0xf0

Add STACKDEPOT=n dependency to UNWINDER_GUESS to avoid the problem.

---
 arch/x86/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
arch/x86/Kconfig.debug +1 -0
index 6293a8768a91..672441c008c7 100644
@@ -400,6 +400,7 @@ config UNWINDER_FRAME_POINTER
 config UNWINDER_GUESS
 	bool "Guess unwinder"
 	depends on EXPERT
+	depends on !STACKDEPOT
 	---help---
 	  This option enables the "guess" unwinder for unwinding kernel stack
 	  traces.  It scans the stack and reports every kernel text address it
Signature · 1 line
2.13.6
Acked-by on v1 1/1
#1 lore raw
Quoted 38 lines · Andrey Ryabinin

Stackdepot doesn't work well with CONFIG_UNWINDER_GUESS=y. The 'guess' unwinder generate awfully large and inaccurate stacktraces, thus stackdepot can't deduplicate stacktraces because they all look like unique. Eventually stackdepot reaches its capacity limit:

WARNING: CPU: 0 PID: 545 at lib/stackdepot.c:119 depot_save_stack+0x28e/0x550
Call Trace:
 ? kasan_kmalloc+0x144/0x160
 ? depot_save_stack+0x1f5/0x550
 ? do_raw_spin_unlock+0xda/0xf0
 ? preempt_count_sub+0x13/0xc0

<...90 lines...>

? do_raw_spin_unlock+0xda/0xf0

Add STACKDEPOT=n dependency to UNWINDER_GUESS to avoid the problem.

---
 arch/x86/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
arch/x86/Kconfig.debug +1 -1
index 6293a8768a91..672441c008c7 100644
@@ -400,6 +400,7 @@ config UNWINDER_FRAME_POINTER
 config UNWINDER_GUESS
        bool "Guess unwinder"
        depends on EXPERT
+       depends on !STACKDEPOT
        ---help---
          This option enables the "guess" unwinder for unwinding kernel stack
          traces.  It scans the stack and reports every kernel text address it
--
Quoted 2 lines

2.13.6

Acked-by on v1 1/1
#2 lore raw
In reply to Andrey Ryabinin
Quoted 14 lines · Andrey Ryabinin

Stackdepot doesn't work well with CONFIG_UNWINDER_GUESS=y. The 'guess' unwinder generate awfully large and inaccurate stacktraces, thus stackdepot can't deduplicate stacktraces because they all look like unique. Eventually stackdepot reaches its capacity limit:

WARNING: CPU: 0 PID: 545 at lib/stackdepot.c:119 depot_save_stack+0x28e/0x550
Call Trace:
 ? kasan_kmalloc+0x144/0x160
 ? depot_save_stack+0x1f5/0x550
 ? do_raw_spin_unlock+0xda/0xf0
 ? preempt_count_sub+0x13/0xc0

<...90 lines...>

Quoted 7 lines

? do_raw_spin_unlock+0xda/0xf0

Add STACKDEPOT=n dependency to UNWINDER_GUESS to avoid the problem.

Signature · 1 line
Josh
#3 lore raw

[tip:x86/urgent] x86/unwinder/guess: Prevent using CONFIG_UNWINDER_GUESS=y with CONFIG_STACKDEPOT=y

In reply to Andrey Ryabinin
x86/unwinder/guess: Prevent using CONFIG_UNWINDER_GUESS=y with CONFIG_STACKDEPOT=y
Commit-ID:  0a373d4fc248cb707821d7dad54ce6d5bcb0cdfe
Gitweb:     https://git.kernel.org/tip/0a373d4fc248cb707821d7dad54ce6d5bcb0cdfe
Author:     Andrey Ryabinin <[email protected]>
AuthorDate: Thu, 30 Nov 2017 15:35:54 +0300
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 11 Dec 2017 19:07:07 +0100

x86/unwinder/guess: Prevent using CONFIG_UNWINDER_GUESS=y with CONFIG_STACKDEPOT=y

Stackdepot doesn't work well with CONFIG_UNWINDER_GUESS=y. The 'guess' unwinder generate awfully large and inaccurate stacktraces, thus stackdepot can't deduplicate stacktraces because they all look like unique. Eventually stackdepot reaches its capacity limit:

  WARNING: CPU: 0 PID: 545 at lib/stackdepot.c:119 depot_save_stack+0x28e/0x550
  Call Trace:
   ? kasan_kmalloc+0x144/0x160
   ? depot_save_stack+0x1f5/0x550
   ? do_raw_spin_unlock+0xda/0xf0
   ? preempt_count_sub+0x13/0xc0

<...90 lines...>

? do_raw_spin_unlock+0xda/0xf0

Add a STACKDEPOT=n dependency to UNWINDER_GUESS to avoid the problem.

---
 arch/x86/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
arch/x86/Kconfig.debug +1 -0
index 6293a87..672441c 100644
@@ -400,6 +400,7 @@ config UNWINDER_FRAME_POINTER
 config UNWINDER_GUESS
 	bool "Guess unwinder"
 	depends on EXPERT
+	depends on !STACKDEPOT
 	---help---
 	  This option enables the "guess" unwinder for unwinding kernel stack
 	  traces.  It scans the stack and reports every kernel text address it