Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4016154yba; Tue, 9 Apr 2019 09:21:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV9d4OYp0QR1ysd8MWpaE40evSkh5qRvf1hvqzrKE5rVst3mhAb37IwlFEA3ivFaL1cw8q X-Received: by 2002:a62:ae13:: with SMTP id q19mr37975833pff.152.1554826892009; Tue, 09 Apr 2019 09:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554826892; cv=none; d=google.com; s=arc-20160816; b=cFftb3xkhz3yqubS4igP/uGNfs7NjgcicfHTJwLTnxdkgrHWOIN3QFT/k1yp+kLOXJ 0uDvmryQMAbDLSB+A1PzAfqDbEk4TJ4/M0b3eFHoajcOw0YPbJ5WQH1T2tygJsjLodOL s6p2tLgTxFXq5vrN1z/J0aa+lH+1N0+MICAvIJi0RTFOAufgsqGaQ0V0QRWrCsl7pNA2 KJn18N+LJo1JpuKCyJ5QryG42Hb0hlPMQH2l1woNsMV7UGbYu4t7ZTzMFGsp13F+k72C mn8eUbwchMHkjTGFNWg4Au6I7QJRWFhdPlHrpAFjfdF+QwX2rfG5A5HizhE4/V7pkimo A9Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9imv8zmeNakxRzEk5Gp6PO+5BWFNMWRb4XZCaz5T864=; b=iVMbIuJo1gCWbLt1LTAyz5aDaLzvno84moiyJL/ULut2rTAKNiqMuPEE4YOaVWJmWL Ojf5Cf0SGgX0UlFj/7WiXVJa+g6fCOFsqI/Fg6E8JPR7WDZrJopaPBfFt0qQMI6/qGGr oR1spB59E1CKPxVon7K2mXcyR8b7+E1BK5OSQX3s/FSfagNFUuxUTjgKGZda3EdW+wZj SMHOO4NGmT/GoA0VUEzQsp+g6SVzOUWJtg4YnfR2yaGnzCT6Asynf4EloRQiCthn1SzG h2drKyT8avVrDOym6Vfw4lvBVDDneDmNBxxiuXZLP+GYeLy6morUmY+rSJwzn73p6UdT 9deA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=OpDzbeTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d92si15195541pld.100.2019.04.09.09.21.15; Tue, 09 Apr 2019 09:21:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=OpDzbeTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbfDIQUe (ORCPT + 99 others); Tue, 9 Apr 2019 12:20:34 -0400 Received: from merlin.infradead.org ([205.233.59.134]:45010 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbfDIQUe (ORCPT ); Tue, 9 Apr 2019 12:20:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9imv8zmeNakxRzEk5Gp6PO+5BWFNMWRb4XZCaz5T864=; b=OpDzbeTN0eTNcSzbJSfUzlzlH tffFRcXesd1LRtPlJWom6JqRr/wMvNWW27ajHc7TH3/5f8h+jx/QuyQA77PDDlKr+2KL+8hiJ2rg5 yZmTPkU049xb6YBx3DwodswZbKFh1eknhPUFwWLfqQHIY3EY0DX0tsLUpixilERgcNTRd0m/CtuGn 6EK8uTXe8nYW8xqcg8yYxDxg67JvRg2bPup/omtvMSI5JmhqpTqgEU9ImbohXUqtDAt2qln4K2HNA 9pVmRch2REayQlUp5S0PYccHDet9XY7Az9OaUlO7ErOclGzPm5XzbYyf5FgWhCzB+GDZ/AKuiXXxq vM0xza87w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDtU6-0001Cb-DG; Tue, 09 Apr 2019 16:20:30 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id F27A0201F29A3; Tue, 9 Apr 2019 18:20:28 +0200 (CEST) Date: Tue, 9 Apr 2019 18:20:28 +0200 From: Peter Zijlstra To: Raphael Gault Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jpoimboe@redhat.com, catalin.marinas@arm.com, will.deacon@arm.com, julien.thierry@arm.com Subject: Re: [RFC 2/6] objtool: arm64: Add required implementation for supporting the aarch64 architecture in objtool. Message-ID: <20190409162028.GT11158@hirez.programming.kicks-ass.net> References: <20190409135243.12424-1-raphael.gault@arm.com> <20190409135243.12424-3-raphael.gault@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190409135243.12424-3-raphael.gault@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 09, 2019 at 02:52:39PM +0100, Raphael Gault wrote: > The decoding of the instruction is split into classes and subclasses as described into > the Instruction Encoding in the ArmV8.5 Architecture Reference Manual. > tools/objtool/arch/arm64/decode.c | 2843 +++++++++++++++++ Oh man, I hope you generated much of that from the ARM64 Instruction Set Architecture XML files [*]. Otherwise that's been a lot of typing. Anyway, since you now have that, would it make sense to use this same decoder in your kernel tree? I found at least one partial decoder in arch/arm64/kernel/probes/decode-insn.c, but I suspect you have more. (Note kprobes is how x86 initially grew its instruction decoder IIRC) * https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools