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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40F67C433E6 for ; Wed, 3 Feb 2021 11:58:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAC6564F6A for ; Wed, 3 Feb 2021 11:58:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234132AbhBCL6Z (ORCPT ); Wed, 3 Feb 2021 06:58:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233972AbhBCL6Y (ORCPT ); Wed, 3 Feb 2021 06:58:24 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EACABC0613ED; Wed, 3 Feb 2021 03:57:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qV09Im9zStsEDN3aK7Y5tK1FdFUYhtdI63Y+lrzaDhc=; b=oMNuAy5gx4vP9iN+v48oFdTUkz Zd119CdRuTFGy4J6KaIHwrSvqGRhBCUXcw48dXLfprFp7AhMoGA7J8U/m6cL4eFUNV4KoF5qFu7m5 u0ByNkvAtdaPxi74AU0eX4aldWXbd29MVqbwM+o4jEqDd86uC86Pa3gcLnidkZ5MYpaUEGUbnwti+ rSoPd478W8MmCcAkXBm5+Tq2wUHdhd/VbJ5lD4NmQoyjs3a8FkbDDcE2Le4xNW+Ub9vTHVWYNH+Y5 yEL1PpTgyO8DmWyL8uJIhF4yhH50wNruWO9eYAZSrhTBtDoeyFuD50umDOLd23EcLthyyfxgxDrt8 o8CzFQeg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1l7Gml-00GmtO-US; Wed, 03 Feb 2021 11:57:29 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 412043003D8; Wed, 3 Feb 2021 12:57:27 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2A5702364E363; Wed, 3 Feb 2021 12:57:27 +0100 (CET) Date: Wed, 3 Feb 2021 12:57:27 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: Nick Desaulniers , Julien Thierry , Ard Biesheuvel , Mark Brown , Catalin Marinas , Kees Cook , Linux ARM , linux-efi , linux-hardening@vger.kernel.org, LKML , Mark Rutland , Masahiro Yamada , Michal Marek , raphael.gault@arm.com, Will Deacon , clang-built-linux , Bill Wendling , swine@google.com, yonghyun@google.com Subject: Re: [RFC PATCH 12/17] gcc-plugins: objtool: Add plugin to detect switch table on arm64 Message-ID: References: <20210120173800.1660730-13-jthierry@redhat.com> <20210127221557.1119744-1-ndesaulniers@google.com> <20210127232651.rj3mo7c2oqh4ytsr@treble> <20210201214423.dhsma73k7ccscovm@treble> <671f1aa9-975e-1bda-6768-259adbdc24c8@redhat.com> <20210203001414.idjrcrki7wmhndre@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210203001414.idjrcrki7wmhndre@treble> Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Tue, Feb 02, 2021 at 06:14:14PM -0600, Josh Poimboeuf wrote: > > Sure, but this is what production unwinders do, and they don't require > > compiler plugins, right? > > What do you mean by "production unwinders"? Generally unwinders rely on > either frame pointers or DWARF, but (without validation) those aren't > robust enough for live patching in the kernel, so I'm not sure how this > is relevant. Not to mention that DWARF and consequently it's unders are horribly large, complex and above all fragile things. There's a reason ORC got invented, DWARF is simlpy unacceptable and inadequate. Now, one avenue that has been mentioned in the past, but I've not seen recently, is to have objtool use DWARF as input to help it understand the code. At least in userspace we can rely on DWARF libs. But I'm fairly sure people aren't jumping up and down for having to always build their kernel with DWARFs on, compile speed etc..