From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752863AbdEJNNi (ORCPT ); Wed, 10 May 2017 09:13:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbdEJNNh (ORCPT ); Wed, 10 May 2017 09:13:37 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9352019CF3E Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9352019CF3E Date: Wed, 10 May 2017 08:13:35 -0500 From: Josh Poimboeuf To: Jiri Slaby Cc: Jiri Kosina , Linus Torvalds , Andrew Morton , live-patching@vger.kernel.org, Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Andy Lutomirski Subject: Re: [PATCH 7/7] DWARF: add the config option Message-ID: <20170510131334.m7dhngdpwmuytpkh@treble> References: <20170505122200.31436-1-jslaby@suse.cz> <20170505122200.31436-7-jslaby@suse.cz> <20170507165524.cdxfuwbd5alr7v6k@treble> <20170509192253.5lsb3yg2nwl2nrcw@treble> <18abff55-25d0-e783-8e1f-97bef42da1e3@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <18abff55-25d0-e783-8e1f-97bef42da1e3@suse.cz> 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.29]); Wed, 10 May 2017 13:13:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 10, 2017 at 10:32:06AM +0200, Jiri Slaby wrote: > On 05/09/2017, 09:22 PM, Josh Poimboeuf wrote: > > On Tue, May 09, 2017 at 08:47:50PM +0200, Jiri Kosina wrote: > >> On Sun, 7 May 2017, Josh Poimboeuf wrote: > >> > >>> DWARF is great for debuggers. It helps you find all the registers on > >>> the stack, so you can see function arguments and local variables. All > >>> expressed in a nice compact format. > >>> > >>> But that's overkill for unwinders. We don't need all those registers, > >>> and the state machine is too complicated. > >> > >> OTOH if we make the failures in processing of those "auxiliary" > >> information non-fatal (in a sense that it neither causes kernel bug nor > >> does it actually corrupt the unwinding process, but the only effect is > >> losing "optional" information), having this data available doesn't hurt. > > > > But it does hurt, in the sense that the complicated format of DWARF CFI > > means the unwinder has to jump through a lot more hoops to read it. > > Why that matters, actually? Unwinder is nothing to be performance > oriented. And if somebody is doing a lot of unwinding during runtime, > they can switch to in-this-case-faster FP unwinder. More complexity == more bugs. > > And anyway, fixing the correctness of the DWARF data is only half the > > problem IMO. The other half of the problem is unwinder complexity. > > Complex, but generic and working. IMO, it would be rather though to come > up with some tool working on different compilers or even different > versions of gcc. I mean some tool to convert the DWARF data to something > proprietary. The conversion would be as complex as is the unwinder plus > conversion to the proprietary format and its dump into ELF. We would > still rely on a (now out-of-kernel-runtime-code) complex monolith to do > it right. Complexity outside of the kernel is infinitely better than complexity in mission critical oops code. -- Josh