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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0940C433EF for ; Fri, 8 Apr 2022 11:42:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234991AbiDHLoH (ORCPT ); Fri, 8 Apr 2022 07:44:07 -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> 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. 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 74D1EC433F5 for ; Fri, 8 Apr 2022 11:43:26 +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=tsXhapxtl6SKICaO9fmfYdE8dKMRtWvo0WKTXmXPYGU=; b=ooieQAEWPuU9Z9 0/qscVRV+olWy+1XueHxiN85TXmRHXfvl8/i3ulglLDX/ZKIk9GZVC2JCvhhWfpaxLwqQF9X6D/Vm E3QOMhjhpugV8EjTvbGmBNZ70KvGjoQzh9vN5RKl/PsGWGMJGm2LbWF1suDkB0KzGkK5U7epTtxBj N/G0SIrZVoy0JVx4T8mS5NJx+pDb5Dw+DHsds8D03/r+OYKJ/u8hBotWZSE+jtNOj/SfveqksCfDa axqs1wlnPlgr8laVEFv9ySQBrbIqfvthyaomYZFr2CcKdPs19/af206u6MmypoPZVAgjgvYslThyL lxExWebnJ4I/NzvwDIFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncn0I-00Gi4f-Ni; Fri, 08 Apr 2022 11:42:14 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncmzm-00GhpW-B0 for linux-arm-kernel@bombadil.infradead.org; Fri, 08 Apr 2022 11:41:42 +0000 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-Disposition: inline In-Reply-To: <20220408002147.pk7clzruj6sawj7z@treble> 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 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel