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=-7.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 C1836C2D0DB for ; Thu, 23 Jan 2020 13:52:28 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 95A6A2077C for ; Thu, 23 Jan 2020 13:52:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W6kYsrO9"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Huj2ztxM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95A6A2077C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XMajKQwq3S3f2VQOmWJSF8VBd9TT6eM6fLUsIPVVt1s=; b=W6kYsrO9mWHh642nsF4HkuDxi dEo5rf5pHr4HWNC1BqP7FLT9lNnDx/G01Iqz2U4Caeetv9S1fGzHI1keHx8JVYHrKvIlr/6y/PW/w pga5PYr/LcnhqG6clHVybAjOz54PT1zARttqWXsLkTPGwktwMuyHKavjAE5zdf+tMklDsMH/hojVd kqEx3rmTqNxhrVyzMCqq9JAd1FfJEfUKnaqPvWxb1bW02oZNGB0pKtB/Yw5dTd+6UYAsjlHWleUQ5 6y2cf//qEQpiKVpYw08tuGd4a961xRmQSR5xlHNAEEp+uedYZ+vQh7r/V+4TKs7+huzrDPRlkbJEs zAjt4D3Qw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iucuJ-0001gQ-Uf; Thu, 23 Jan 2020 13:52:27 +0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iucuG-0001g3-Ui for linux-arm-kernel@lists.infradead.org; Thu, 23 Jan 2020 13:52:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579787543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FzK0nabFcVqCxu+Dc6EYvtOWvTDLB9MHtbAW7toY8PA=; b=Huj2ztxM6yIVBJtnYEPw4PqLO0PLaaEoFSG0ZFOmKAOh/qa7S8s//R+M2OsWSi+8d0+80x JbNgHfJwHk4GMo2nBV0r1anP6bdFB9d01OXh4oS1okErhph26FzA0uCqBrCB9izrMrfA6z sqvSSSXiOJDe0jni6ncupUYn2nw3zMs= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-hXc4Y_WZPQCnNW7F7cjsaA-1; Thu, 23 Jan 2020 08:52:22 -0500 Received: by mail-wm1-f69.google.com with SMTP id b133so1061049wmb.2 for ; Thu, 23 Jan 2020 05:52:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FzK0nabFcVqCxu+Dc6EYvtOWvTDLB9MHtbAW7toY8PA=; b=NZsTELP0WmjiHGpaf3uRpwVB4GOlVDcEznjDSTdPzMgP8Q+eYOhbjNxZ7uC9l/5oE5 Z/W4tDlObvQCx2Fx5njsZS17QFCtvfC8BW8kUOX+ZJKtEduiGE4Z87DkKr7iB8akVW1F fmxgHm6J1lERBa2avg61iX5DbJ8XHS5+kUiRnmPlHR8wsPQQmvtioCjzsagstC/7eTip aAoJbcNYN/rAYyQZphzxpQZUteGO2b+14DTsFYLVhWE90vuPyrvtaNjg9z1bhm+Au9Yv UJO4JiZB05aa9dju+Y7nX476ayMyUhSiZRCpQvOrRGQyz5thdIWiXpKRMJdU63Svs7Vk eZXg== X-Gm-Message-State: APjAAAU4IetSDODVcc/2mcORJU1h0C8PsRLHBv7SKXLEvHpbi1THT+5J u3Vmo4fBVxnX0vwcOV9jI39lU8VdwoU9fzdykdSMNujvj3/y6HHcN0xQTM0a15jtOwxPljZHWd3 fZ20JlsTO1u8rbxk5V1ES2ovTTilHK4F8PsM= X-Received: by 2002:a1c:4008:: with SMTP id n8mr4342416wma.121.1579787540987; Thu, 23 Jan 2020 05:52:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwwuAHOv3mQdajAOj8Wx0mgp4dKgh3ugzrnb0nmfg+V0M9H/8uW8obx7N/CZnGLglD/gLhKTg== X-Received: by 2002:a1c:4008:: with SMTP id n8mr4342396wma.121.1579787540799; Thu, 23 Jan 2020 05:52:20 -0800 (PST) Received: from [192.168.1.81] (host81-140-166-164.range81-140.btcentralplus.com. [81.140.166.164]) by smtp.gmail.com with ESMTPSA id l3sm3135558wrt.29.2020.01.23.05.52.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jan 2020 05:52:20 -0800 (PST) Subject: Re: [RFC v5 00/57] objtool: Add support for arm64 To: Will Deacon References: <20200109160300.26150-1-jthierry@redhat.com> <20200121103025.GC11154@willie-the-truck> From: Julien Thierry Message-ID: <400d402d-c964-6f0c-2954-6f6afcb94635@redhat.com> Date: Thu, 23 Jan 2020 13:52:17 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200121103025.GC11154@willie-the-truck> Content-Language: en-US X-MC-Unique: hXc4Y_WZPQCnNW7F7cjsaA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200123_055225_073720_28CC0790 X-CRM114-Status: GOOD ( 15.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peterz@infradead.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, raphael.gault@arm.com, jpoimboe@redhat.com, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/21/20 10:30 AM, Will Deacon wrote: > On Thu, Jan 09, 2020 at 04:02:03PM +0000, Julien Thierry wrote: >> This patch series is the continuation of Raphael's work [1]. All the >> patches can be retrieved from: >> git clone -b arm64-objtool-v5 https://github.com/julien-thierry/linux.git > > [...] > >> objtool: arm64: Decode unknown instructions >> objtool: arm64: Decode simple data processing instructions >> objtool: arm64: Decode add/sub immediate instructions >> objtool: arm64: Decode logical data processing instructions >> objtool: arm64: Decode system instructions not affecting the flow >> objtool: arm64: Decode calls to higher EL >> objtool: arm64: Decode brk instruction >> objtool: arm64: Decode instruction triggering context switch >> objtool: arm64: Decode branch instructions with PC relative immediates >> objtool: arm64: Decode branch to register instruction >> objtool: arm64: Decode basic load/stores >> objtool: arm64: Decode load/store with register offset >> objtool: arm64: Decode load/store register pair instructions >> objtool: arm64: Decode FP/SIMD load/store instructions >> objtool: arm64: Decode load/store exclusive >> objtool: arm64: Decode atomic load/store >> objtool: arm64: Decode pointer auth load instructions >> objtool: arm64: Decode load acquire/store release >> objtool: arm64: Decode load/store with memory tag >> objtool: arm64: Decode load literal >> objtool: arm64: Decode register data processing instructions >> objtool: arm64: Decode FP/SIMD data processing instructions >> objtool: arm64: Decode SVE instructions > > That's a lot of decoding logic which we already have in > arch/arm64/{kernel/insn.c,include/asm/insn.h}. I'd prefer to see this stuff > reused or generated from a single source, since it's really easy to get it > wrong, has a tendency to bitrot and is nasty to debug. > The thing is that the code in those files is mostly encoding logic (motivated by BPF) rather than decoding (except for the instruction that might be trapped, but these rarely overlap with instructions that objtools cares about). I agree that ideally the decoding/encoding should be under arch/arm64/lib, I was just a bit weary introducing a lot of decoding code under arch/arm64 that wouldn't even be used in kernel code. But I can make an attempt for the encode/decode lib and post it as part of the next version. Cheers, -- Julien Thierry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel