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=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 32921C433DB for ; Wed, 20 Jan 2021 17:44:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 D80C4207C4 for ; Wed, 20 Jan 2021 17:44:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D80C4207C4 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+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qQiBtAtOQLnkvvuGBEMM3PEiXjYeTKaG7Bl0aD+W1i4=; b=vrEeUNX4bQBecrf5e1RQ+5w6b cnUnbAtLB5j8c56DfZcRsTQ9YMislUe82nz+xr5Y+hhe/Uk6+hQsAVVGdcJqZP4bGZH0GL5/FUjRG J14lKvcnzAcr/ys0Og/P2rQch56ZdduzJ3bEAlhy43CgLoIRRe+Ee/GphMa8rGsx4IDLC4YHS7tqy umiWeT29AAfw2i83tALY4RAsJLYoJtlJAQx1KdlXrgPy0Ew2OXmvy27e9AujKZgjXz7Nfbm6XRDyI GZPpDRI48fd4BGT2sS8/MVMEw12RhED7E6XOzWx+zB/rSmoXcNOfaxKwmKo7hVuNOTZltLcIKMyBA UMSjWwDJw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HUk-0004rP-OU; Wed, 20 Jan 2021 17:42:14 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HR8-0002sy-8x for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 17:38:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611164305; 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=D/xnDCC8nOFGfsA+lStDur0FhQOLzj3Vyiz97OzDpc8=; b=UFhrxpgTBZJqGhzQzzIpIvJjkjgM4uRQosvY0tFCPoB8mv5531b+VQ8UPIBOY+jhBNLtGy vlOj0hd1ZE36buujy7pMO+Plua32AqJ4Lixc1lwss4LPbtakkrZH8q2jIJCf7VDEmF6NDT lZSqNFvkhgyntIQkdrxXc2q/aY0L7K8= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-X2Exy2GzMM2ItuGOdnpN0A-1; Wed, 20 Jan 2021 12:38:21 -0500 X-MC-Unique: X2Exy2GzMM2ItuGOdnpN0A-1 Received: by mail-wr1-f69.google.com with SMTP id x12so1005169wrw.21 for ; Wed, 20 Jan 2021 09:38: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:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D/xnDCC8nOFGfsA+lStDur0FhQOLzj3Vyiz97OzDpc8=; b=iEWhheraTUSgujZacMfYaiX9jcfIOfpXyZtimN5cODGmuG4nrMXdQ79GwBscnHzXqB eniyYQtgWE6kxR+aLfK9vLuWvg691E/awpH5B+LkOGktOEFRDfhaIRjNa1iP/EqgqVY8 HDPAlRffBiaQm0PWBGLb0Um/V9DLT7FaRmkwwg6BuQZ+dKR57NE0mYm4cT7VLIgbO9yK rWIIHuGpj6afLnn18m4zSw6CbbFFn3z8rAAYdt9wkeZrmR7AIRDJtsTGoa2fK/AYDwbL kN5uG6gYdyF6PwmMNE1MxEQoNaK3zqY50SdU+aQgmfpLLvJmcd+cyxci5gj9uaxpL/z1 13hQ== X-Gm-Message-State: AOAM530T1Eoyf2YzjezsXpCq8wys6cJoJye2oMe4oA1leuP/KBIUnKNl a/Ajis4qI1GG4kaQLIeuFjYo3zEzAVjOYSEyzpcsupM4dnhJVFakGlts3+kgKx/ZDhE3uBBctP3 ndWUZX9IVdyHpFaVdwA54OzZaCraLUse78ZA= X-Received: by 2002:a5d:660c:: with SMTP id n12mr10531777wru.291.1611164300887; Wed, 20 Jan 2021 09:38:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5Gt3Pu1qW2EdggZtB7MguFp/4lDK5HfkXjM4AsXdknZgXR2j5+4eIlyKpZr1CO2oaPexByA== X-Received: by 2002:a5d:660c:: with SMTP id n12mr10531762wru.291.1611164300731; Wed, 20 Jan 2021 09:38:20 -0800 (PST) Received: from redfedo.redhat.com ([2a01:cb14:499:3d00:cd47:f651:9d80:157a]) by smtp.gmail.com with ESMTPSA id x11sm4948325wmi.4.2021.01.20.09.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 09:38:20 -0800 (PST) From: Julien Thierry To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 07/17] objtool: arm64: Decode other system instructions Date: Wed, 20 Jan 2021 18:37:50 +0100 Message-Id: <20210120173800.1660730-8-jthierry@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210120173800.1660730-1-jthierry@redhat.com> References: <20210120173800.1660730-1-jthierry@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jthierry@redhat.com 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-20210120_123830_859807_A6C7CDFB X-CRM114-Status: GOOD ( 12.16 ) 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: mark.rutland@arm.com, linux-efi@vger.kernel.org, michal.lkml@markovi.net, keescook@chromium.org, peterz@infradead.org, catalin.marinas@arm.com, masahiroy@kernel.org, broonie@kernel.org, linux-hardening@vger.kernel.org, jpoimboe@redhat.com, will@kernel.org, ardb@kernel.org, Julien Thierry 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 Decode ERET, BRK and NOPs Signed-off-by: Julien Thierry --- tools/objtool/arch/arm64/decode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/objtool/arch/arm64/decode.c b/tools/objtool/arch/arm64/decode.c index 924121b4b466..a4a587c400a1 100644 --- a/tools/objtool/arch/arm64/decode.c +++ b/tools/objtool/arch/arm64/decode.c @@ -223,6 +223,13 @@ int arch_decode_instruction(const struct elf *elf, const struct section *sec, /* Remaining branch opcodes are conditional */ *type = INSN_JUMP_CONDITIONAL; *immediate = aarch64_get_branch_offset(insn); + } else if (aarch64_insn_is_eret(insn)) { + *type = INSN_CONTEXT_SWITCH; + } else if (aarch64_insn_is_steppable_hint(insn)) { + *type = INSN_NOP; + } else if (aarch64_insn_is_brk(insn)) { + *immediate = aarch64_insn_decode_immediate(AARCH64_INSN_IMM_16, insn); + *type = INSN_BUG; } else { *type = INSN_OTHER; } -- 2.25.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel