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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no 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 45E33C3A5A9 for ; Mon, 4 May 2020 13:13:45 +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 158D92075A for ; Mon, 4 May 2020 13:13:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rhhpPB1q"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="DvkdJkmh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 158D92075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=jzVBADeCqRlb/9f6ElL5IKbDIhQv0KZal4aN2EAvl6E=; b=rhhpPB1qDm0gTa VgMkGWbkfwvldHBMNOYFvSUkdVTeXkeafbIY8U8UL60jQrfpmV0gshZ7ZM7oqE3npSNusdPyqO8vK YTE7+aDTUUp9MzwsmyVGFkdgepPQUxr1o4plVz80F3pcIHWnbTdn1TiP067IVxKQgxgirFP5OXl9c Isqn+eZLR9gMvK65/oUO/HjEi63aC6r1iKNS5qZ1aYhzIbXTwpE1PzFEqoLD2cpdhSRO6B3lb6Owz Dva+VJVk9fsu9gd6zPizT4tcvVsfdfQktQ57qXz6uZ7UHUKBybcOA1ezTD7W4uPGdutZjIMfem7cK RoYgBjW1RIYCDEeDuIeQ==; 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 1jVaul-0006Sj-UO; Mon, 04 May 2020 13:13:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVaue-0006RV-Jz for linux-arm-kernel@lists.infradead.org; Mon, 04 May 2020 13:13:42 +0000 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9032320721; Mon, 4 May 2020 13:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588598016; bh=m5cBouM+VdgiOUWiRfboCGS/3TYZIpp1SjlxUFOcDh4=; h=From:To:Cc:Subject:Date:From; b=DvkdJkmhvSM6Ms9cGKQHkb0G8Ymjpvtb1nR6WxATVdi0+/gaKHRuEDtfrZMZKcALB BQdMYAoEYosJXk6nJd2+4u2xqKIhnpeE7L2qz12a4QxD2ITgFvGxQPZ9NCxlJKaFYd n0u3tNDuLbB5WqxMt7FbfQYh+VFWOs1AOGCsfgeM= From: Mark Brown To: Will Deacon , Catalin Marinas Subject: [PATCH v4 0/4] arm64: Make NOP handling a whitelist Date: Mon, 4 May 2020 14:13:22 +0100 Message-Id: <20200504131326.18290-1-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200504_061336_682351_FCFF6C11 X-CRM114-Status: GOOD ( 10.93 ) 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 , Mark Brown , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently we default to assuming any unrecognized instruction in the hint space can be safely handled as a NOP. This is not robust and any code that really wants a NOP should be using the explicitly defined NOP so let's instead invert this and whitelist those instructions which it is safe to handle as NOPs. Patch 1 adds defines for the HINTs for BTI landing pads which will be used by the in-kernel BTI series to generate landing pads in JITed BPF code so it'd be good if this could be applied on or merged into the BTI branch. v4: - Add a patch renaming _is_nop() to make the usage clearer. - Reorder series and tweak commit logs. v3: - Correct values for more of the HINTs. - Add constants for additional HINTs - Handle XPACLRI as a NOP along with all the other PAC HINTs. - Update commit messages for greater clarity. - Tweak the comment about what a NOP. v2: - Fix values for BTI HINTs. - Rebase on v5.7-rc3+for-next/bti-user Mark Brown (4): arm64: insn: Add constants for new HINT instruction decode arm64: insn: Provide a better name for aarch64_insn_is_nop() arm64: insn: Don't assume unrecognized HINTs are skippable arm64: insn: Report PAC and BTI instructions as skippable arch/arm64/include/asm/insn.h | 30 +++++++++++++++++++++--- arch/arm64/kernel/insn.c | 32 ++++++++++++++++++-------- arch/arm64/kernel/probes/decode-insn.c | 2 +- 3 files changed, 50 insertions(+), 14 deletions(-) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel