Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753198AbdF2Nkt (ORCPT ); Thu, 29 Jun 2017 09:40:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5364 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752901AbdF2Nkm (ORCPT ); Thu, 29 Jun 2017 09:40:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 916F27A188 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 916F27A188 Date: Thu, 29 Jun 2017 08:40:34 -0500 From: Josh Poimboeuf To: Ingo Molnar Cc: x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Jiri Slaby , "H. Peter Anvin" , Peter Zijlstra Subject: Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation Message-ID: <20170629134034.6eorepunw3wbcaht@treble> References: <20170629071414.g4pmbmtegf7jpryz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170629071414.g4pmbmtegf7jpryz@gmail.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 29 Jun 2017 13:40:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1574 Lines: 35 On Thu, Jun 29, 2017 at 09:14:14AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > Now that objtool knows the states of all registers on the stack for each > > instruction, it's straightforward to generate debuginfo for an unwinder > > to use. > > > > Instead of generating DWARF, generate a new format called undwarf, which > > is more suitable for an in-kernel unwinder. See > > tools/objtool/Documentation/undwarf.txt for a more detailed description > > of this new debuginfo format and why it's preferable to DWARF. > > > > Signed-off-by: Josh Poimboeuf > > --- > > tools/objtool/Build | 3 + > > tools/objtool/Documentation/stack-validation.txt | 46 ++--- > > tools/objtool/builtin-check.c | 2 +- > > tools/objtool/builtin-undwarf.c | 70 ++++++++ > > tools/objtool/builtin.h | 1 + > > tools/objtool/check.c | 59 ++++++- > > tools/objtool/check.h | 15 +- > > tools/objtool/elf.c | 212 ++++++++++++++++++++-- > > tools/objtool/elf.h | 15 +- > > tools/objtool/objtool.c | 3 +- > > tools/objtool/undwarf-types.h | 81 +++++++++ > > Just a very quick stylistic suggestion: please name the header 'undwarf_types.h' > (note the underscore versus hyphen), which is the common naming pattern used in > the kernel. Ok, will rename it. -- Josh