Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp219895pxb; Wed, 3 Feb 2021 04:00:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+aWpEJxbXiEASu2jApp41cap44b9q8g96fSJsS4BgLjkPApAz65iNd/0VkmHOGqTQiV0P X-Received: by 2002:a17:906:8684:: with SMTP id g4mr2885424ejx.186.1612353636987; Wed, 03 Feb 2021 04:00:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612353636; cv=none; d=google.com; s=arc-20160816; b=f4VJrd3FSDf+hFl32hhsAPILsMrpaQnCcNkyiCC42Pr25++xlb2qY6wDNBTditONG4 Lc1oe4uAKB0IDWTG3/vOqRJ2GgSJYhifUv9LBh8ZevMnPg1YFc0zxSi4H2V9+NP+StGZ /sCAhTbWmoAJlTOhTAFUHO/0nSzQF7GfSkrJPX1IalJoeUIMwi2du7ndQKEKqC8QP0pF Z99W+/ZgLM6cFpUbqoSV66rTGdm2atEymD2AZgOmbrfzkRAAPkIlX0FtrMSbLUkfnx9R vZ8F24V3kS6T94Q9pUA3vqT+gyNempzMhSSC/f5OzTT29KQ5sS648ee0mVZFxr518Cxm J7ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qV09Im9zStsEDN3aK7Y5tK1FdFUYhtdI63Y+lrzaDhc=; b=Rap0GB0cV+t/b25gH69B3wSlWZXvwcxWLv9gQHtbZ8b3Y9kR8a7jV8IHyV9tJb2cre fQJnWP+PW+TaeRKnXblixgiDLjfFPYkdSEWkBlf7QEZRRSvQ1MxTD37tjNdth/hVhJa+ c+r925oSNTGLwGuDdTFHkf8wfpOsP69nznvEZC0pMJace1j6bn+7jUGBvah/L+3HGj/X 4Lal5jgSVEYSGbFlXTvYvQXjOSI2iMFexD9qlMYn6z/uCivv9O3fn37NHR7Av/2VwMVn 1T6PUqyxGCMQv56X+TsM+YyZ+cGxB6/kLlqsx/skoYJSepqJlY5ClQlEgzJ6Gi3ZSzE2 DpxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oMNuAy5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si1234254edk.467.2021.02.03.04.00.11; Wed, 03 Feb 2021 04:00:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=oMNuAy5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234170AbhBCL6Z (ORCPT + 99 others); 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-kernel@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..