Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp419166pxw; Fri, 8 Apr 2022 10:43:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvNm/ZTqIWVqXde+2pmtKxPlKAR6oOrUvLmGE9BdjdjTvRAV/gB9+z0rQgUP7HlFaYL6cL X-Received: by 2002:a17:902:e84d:b0:155:d31c:5c93 with SMTP id t13-20020a170902e84d00b00155d31c5c93mr20328669plg.103.1649439789198; Fri, 08 Apr 2022 10:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649439789; cv=none; d=google.com; s=arc-20160816; b=rmLPRTTngws/NDxslUUjDSAISs03OxzW7NNAGANT+RwBNga80UR3ZYad9o/4KNsLat LaxmREjPf6MI34ZKX0Q7ImgAwBRfOicaEMdch6/78tArkTzfdT9h04Fw/Big5bTStbyB 9p0W4fhZmkz1pX1F694fIRwA7Am3pe6ni/heE/C4VCEHDBftKHWbZEv4tACqbmzvSVmq UQ87Nuxg/Kj0X4tV9rXBoOBhBzXNdDnAPO5zYDFDQ6aG5QFkNOFta2jHYmjSZ6rnKQ5F g6epHf1+ZUPuhBOorL3QIYurfocxsBsmCBMhsnGiP6caNReSJvDP8odEgIb73Ox1juhF gJDQ== 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=mQ8AKdzMxBFGNBINjR+9BmtRxvC4/CfWJdXWKx3wQT4=; b=VXR2qxhg65M/LN+voHkMX4aPgWiIDr3Qci874SbqxoD2HNcR1BAmYGGBs0ReEkm+bR ysiIO9WE7QBbCVgdeQlzaz2ijlXax4NUC51SwkDz14q49x2659BLhCs2GX2SPzBwUXY5 6sw7sOrSs2DkC+KvmY2/yfvJFB1uHdCMLq0O/9YpURoGQLuvXtEYb8XoHxnM+1RI0Oik D2hb9hZWE0gqPZ15mN3nIxsuPOrjYGPnFpslaSFJ+Apiq8ZxkgfY8Rpkn/efkypBfSCV MKjLHeJUXlcfWCCSOOb5y6O0HS6aYz98az1wqdii1e31fMnwtqDzZJT/SQ6kb8OI0VwH B7ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="m/QV561V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l16-20020a170902f69000b00156b62d6cf6si1514624plg.493.2022.04.08.10.42.54; Fri, 08 Apr 2022 10:43:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="m/QV561V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234984AbiDHLoG (ORCPT + 99 others); Fri, 8 Apr 2022 07:44:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229893AbiDHLoC (ORCPT ); Fri, 8 Apr 2022 07:44:02 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B442189A13; Fri, 8 Apr 2022 04:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=mQ8AKdzMxBFGNBINjR+9BmtRxvC4/CfWJdXWKx3wQT4=; b=m/QV561VZKF+puSKyDHGrf42vS xKNxcHw3Zc5G4f4MDCQC0n9n2hdn7NKoZVpNIyNpQ1UvMM/iZh1fSf+E4NkvXegXKu1Bp4K5wXSTT 1e4VdRp8o9+sNRJ0JbBkTysXUA/9+0wvuBNvNSRehpA16Qffd5YfW3sbbPLNK72G04/txaj9nS9Z/ EP3JmXAeyjpPHto+zFWczVd1tKqfDRQcLE2nnuK6/2rSEOGI3WvnXmq22lY8rQjrK6q7Cf91ykjri NesmJO5qOzsoyapand3YA4CZBgFs2Qv5zblUNNWkjk0wQkUp9zsFkl1pS45RbhmUjnYNhGI1691AK em+VAxDg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncmzf-002tVN-F3; Fri, 08 Apr 2022 11:41:35 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id AA0E09861A4; Fri, 8 Apr 2022 13:41:33 +0200 (CEST) Date: Fri, 8 Apr 2022 13:41:33 +0200 From: Peter Zijlstra To: Josh Poimboeuf Cc: madvenka@linux.microsoft.com, mark.rutland@arm.com, broonie@kernel.org, ardb@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, chenzhongjin@huawei.com Subject: Re: [RFC PATCH v1 0/9] arm64: livepatch: Use DWARF Call Frame Information for frame pointer validation Message-ID: <20220408114133.GP2731@worktop.programming.kicks-ass.net> References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220407202518.19780-1-madvenka@linux.microsoft.com> <20220408002147.pk7clzruj6sawj7z@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220408002147.pk7clzruj6sawj7z@treble> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Right; so not having seen the patches due to Madhaven's email being broken, I can perhaps less appreciated the crazy involved. On Thu, Apr 07, 2022 at 05:21:51PM -0700, Josh Poimboeuf wrote: > 2) > > If I understand correctly, objtool is converting parts of DWARF to a new > format which can then be read by the kernel. In that case, please don't > call it DWARF as that will cause a lot of confusion. > > There are actually several similarities between your new format and ORC, > which is also an objtool-created DWARF alternative. It would be > interesting to see if they could be combined somehow. What Josh said; please use/extend ORC. I really don't understand where all this crazy is coming from; why does objtool need to do something radically weird for ARM64? There are existing ARM64 patches for objtool; in fact they have recently been re-posted: https://lkml.kernel.org/r/20220407120141.43801-1-chenzhongjin@huawei.com The only tricky bit seems to be the whole jump-table issue. Using DWARF as input to deal with jump-tables should be possible -- exceedingly overkill, but possible I suppose. Mandating DWARF sucks though, compile times are so much worse with DWARVES on :/ Once objtool can properly follow/validate ARM64 code, it should be fairly straight forward to have it generate ORC data just like it does on x86_64.