From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C62C8ECAAD3 for ; Wed, 14 Sep 2022 17:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Mime-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s1CNa+/XaUaINLsizG2oMGxqS631tKrgJaOFQ8Ld8HE=; b=Ie8rJCSfW0XQ27 mDaRvRujSlGsIFcmh5M/8ETLD+cNYxKWYVA0sg1J3WGpFSaElWZbcSdSnm1DtvgISUT3GPOMk0YHs S+XtWCVZPh+B/PaJwM77Gx33TipN8Gb1z+hJRO7rK51F1lP2d9PU/I3wnFvh3KY+EICBBRymFxcna SBJZGrgOqWMaFJig3YIZC9W+78Mn+O9G5ZqqJBR8Mc8WskSQojrtY9okwfvJbb4sY9NQKDTxo6xfW 56RXY0YWe7aKuO7L3c/lruRrY+1l6kPjtWfaMTf8s6Ol2baQj4Ls4kJhWASZEqOv7wHmOb+TeVJju 3J+6C+oTaSdWqLbOrhTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYWQE-0060J9-No; Wed, 14 Sep 2022 17:43:38 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYWQB-0060Gk-Gn for linux-arm-kernel@lists.infradead.org; Wed, 14 Sep 2022 17:43:37 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 28EHYR2K002376; Wed, 14 Sep 2022 12:34:27 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 28EHYPMf002375; Wed, 14 Sep 2022 12:34:25 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 14 Sep 2022 12:34:25 -0500 From: Segher Boessenkool To: Peter Zijlstra Cc: Michael Matz , Josh Poimboeuf , Borislav Petkov , linux-toolchains@vger.kernel.org, Indu Bhagat , Nick Desaulniers , linux-kernel@vger.kernel.org, "Jose E. Marchesi" , Miroslav Benes , Mark Rutland , Will Deacon , x86@kernel.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ard Biesheuvel , Chen Zhongjin , Sathvika Vasireddy , Christophe Leroy , Mark Brown Subject: Re: [RFC] Objtool toolchain proposal: -fannotate-{jump-table,noreturn} Message-ID: <20220914173425.GZ25951@gate.crashing.org> References: <20220909180704.jwwed4zhwvin7uyi@treble> <20220914000416.daxbgccbxwpknn2q@treble> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220914_104335_866273_B09BA3CD X-CRM114-Status: GOOD ( 19.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 14, 2022 at 04:55:27PM +0200, Peter Zijlstra wrote: > On Wed, Sep 14, 2022 at 02:28:26PM +0000, Michael Matz wrote: > > Don't mix DWARF debug info with DWARF-based unwinding info, the latter > > doesn't imply the former. Out of interest: how does ORC get around the > > need for CFI annotations (or equivalents to restore registers) and what > > Objtool 'interprets' the stackops. So it follows the call-graph and is > an interpreter for all instructions that modify the stack. Doing that it > konws what the stackframe is at 'most' places. To get correct backtraces on e.g. PowerPC you need to emulate many of the integer insns. That is why GCC enables -fasynchronous-unwind-tables by default for us. The same is true for s390, aarch64, and x86 (unless 32-bit w/ frame pointer). The problem is that you do not know how to access anything on the stack, whether in the current frame or in a previous frame, from a random point in the program. GDB has many heuristics for this, and it still does not get it right in all cases. > > makes it fast? I want faster unwinding for DWARF as well, when there's > > feature parity :-) Maybe something can be learned for integration into > > dwarf-unwind. > > I think we have some details here: > > https://www.kernel.org/doc/html/latest/x86/orc-unwinder.html It is faster because it does a whole lot less. Is that still enough? It's not clear (to me) what exact information it wants to provide :-( Segher _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel