From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753782AbdEEMWT (ORCPT ); Fri, 5 May 2017 08:22:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:46523 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753369AbdEEMWH (ORCPT ); Fri, 5 May 2017 08:22:07 -0400 From: Jiri Slaby To: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Subject: [PATCH 7/7] DWARF: add the config option Date: Fri, 5 May 2017 14:22:00 +0200 Message-Id: <20170505122200.31436-7-jslaby@suse.cz> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170505122200.31436-1-jslaby@suse.cz> References: <20170505122200.31436-1-jslaby@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DWARF unwinder is in place and ready. So introduce the config option to allow users to enable it. It is by default off due to missing assembly annotations. And we now allow turning off FRAME_POINTERS if DWARF unwinder is selected. Signed-off-by: Jiri Slaby Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org --- arch/x86/Kconfig | 2 +- lib/Kconfig.debug | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index cd18994a9555..b37fa89c5f19 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -689,7 +689,7 @@ config X86_32_IRIS config SCHED_OMIT_FRAME_POINTER def_bool y prompt "Single-depth WCHAN output" - depends on X86 + depends on X86 && !DWARF_UNWIND ---help--- Calculate simpler /proc//wchan values. If this option is disabled then wchan values will recurse back to the diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e90125b6498e..03297955ece0 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -55,6 +55,17 @@ config UNWIND_INFO If you don't debug the kernel, you can say N, but we may not be able to solve problems without frame unwind information or frame pointers. +config DWARF_UNWIND + bool "DWARF stack unwind support" + depends on UNWIND_INFO && !KASAN + depends on X86 + help + This enables more precise stack traces, omitting all unrelated + occurrences of pointers into kernel code from the dump. + + KASAN is too slow with this unwinder, so it is excluded from + using in parallel. + config BOOT_PRINTK_DELAY bool "Delay each boot printk message by N milliseconds" depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY @@ -1690,7 +1701,8 @@ config FAULT_INJECTION_STACKTRACE_FILTER depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT depends on !X86_64 select STACKTRACE - select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !SCORE + select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !X86 && !ARM_UNWIND && !ARC && !SCORE + select UNWIND_INFO if X86 && !FRAME_POINTER help Provide stacktrace filter for fault-injection capabilities @@ -1699,7 +1711,8 @@ config LATENCYTOP depends on DEBUG_KERNEL depends on STACKTRACE_SUPPORT depends on PROC_FS - select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC + select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !X86 && !ARM_UNWIND && !ARC + select UNWIND_INFO if X86 && !FRAME_POINTER select KALLSYMS select KALLSYMS_ALL select STACKTRACE -- 2.12.2