Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a373d4f authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Ingo Molnar
Browse files

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.

Reported-by: default avatarkernel test robot <xiaolong.ye@intel.com>
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: default avatarDmitry Vyukov <dvyukov@google.com>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171130123554.4330-1-aryabinin@virtuozzo.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent f79ce87f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -400,6 +400,7 @@ config UNWINDER_FRAME_POINTER
config UNWINDER_GUESS
config UNWINDER_GUESS
	bool "Guess unwinder"
	bool "Guess unwinder"
	depends on EXPERT
	depends on EXPERT
	depends on !STACKDEPOT
	---help---
	---help---
	  This option enables the "guess" unwinder for unwinding kernel stack
	  This option enables the "guess" unwinder for unwinding kernel stack
	  traces.  It scans the stack and reports every kernel text address it
	  traces.  It scans the stack and reports every kernel text address it