From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934111AbdEZTVs convert rfc822-to-8bit (ORCPT ); Fri, 26 May 2017 15:21:48 -0400 Received: from terminus.zytor.com ([65.50.211.136]:50087 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932973AbdEZTVn (ORCPT ); Fri, 26 May 2017 15:21:43 -0400 Date: Fri, 26 May 2017 12:16:09 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20170523054906.q2x2hib73fo7wibh@gmail.com> References: <20170505122200.31436-1-jslaby@suse.cz> <20170505122200.31436-7-jslaby@suse.cz> <20170507165524.cdxfuwbd5alr7v6k@treble> <20170519205354.caeyqri2k6gvso3w@treble> <8dbbb971-fc41-fba2-f356-931a7eabe6ef@zytor.com> <20170519212913.otir6mlujoxoy3ha@treble> <20170522111248.q74jgpqlwxl5oby7@gmail.com> <0192326e-2abc-5bc2-07c9-fa15f2e31372@zytor.com> <20170523054906.q2x2hib73fo7wibh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 7/7] DWARF: add the config option To: Ingo Molnar CC: Josh Poimboeuf , linux-kernel@vger.kernel.org, Jiri Slaby , Andrew Morton , live-patching@vger.kernel.org, Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Andy Lutomirski , Jiri Kosina , Linus Torvalds , Peter Zijlstra From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 22, 2017 10:49:06 PM PDT, Ingo Molnar wrote: > >* H. Peter Anvin wrote: > >> On 05/22/17 04:12, Ingo Molnar wrote: >> \>> >> >> This construct might be useful for other arches, which is why I >called >> >> it "FP" instead of "BP". But then I ruined that with the last 3 >:-) >> > >> > Please call it BP - 'FP' can easily be read as floating-point, >making it all >> > super-confusing. We should use canonical x86 register names and >ordering - even >> > if not all registers are used straight away. >> > >> >> Seriously, I suspect that at the end of the day we will have >reinvented >> DWARF. > >Absolutely - the main difference is: > >- the debug-info implementation is _internal_ to the kernel so it can >be fixed >instead of "oh, wait 2 years for the toolchain to fix this particular >bug, work >it around in the kernel meanwhile" kind of crazy flow and dependencies. >I.e. >the debug-info generation and parsing code is both part of the kernel >Git tree > and can be iterated (and fixed) at once with. > >- the debug-info is auto-generated for assembly as well, leaving >assembly code > maintainable. > >- the debug-info has a sane data structure designed for robustness and > compactness > >So even if it's a subset of the existing complexity of dwarf et al we >are still >literally infinitely better off with this model. > >Thanks, > > Ingo This assumes that it actually ends up being feasible for objtool to do so. It is worth noting that using DWARF for unwinding vs auto-generating the unwind information are independent issues. Another option is to use (or postprocess) the compiler-generated DWARF for C modules and pursue autogeneration only for assembly modules, which ought to be a much easier problem and is less dependent on discovering new compiler-generated patterns. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.