From patchwork Thu Nov 19 13:39:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 11917443 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=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 2D89FC2D0E4 for ; Thu, 19 Nov 2020 13:40: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 A3DA62158C for ; Thu, 19 Nov 2020 13:40:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iZABk0NN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3DA62158C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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: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=WrXLnZ7NKEPLc18GrkseaQ7I8pKWRDpZf5+Eq7i5TG0=; b=iZABk0NNvRhDzz+I4yl3oiHntT gm9NAVUwOJ7dIaTqQ3vAO3wodiUAZoz4sMxSTOvsCb4IIv0M/1k6tYioOhsOU9G/U8yEUppQS56L8 ioOFAcQBAlFGX2FGSA5isA8aGpVxcbHecfM8snNfN3gUEDxRv9o87Ays3jHc06GW798/f8p6SSRIA XBiRZmKteqiePLSEQPf2aSXQVOJGdE3ob237APj0fRGSGJYOtCYYtgcNkBg7sP2GK9UfoOa2ZIjeO pXJOQ3gK8qJk0SytENF0QdkwfoI8gI3fAO98naU5yGV/dO0y9tCiy/4Uokbz6JWB5YLDs4T518tFR VFT3Bmvg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfkAV-0001Kl-5s; Thu, 19 Nov 2020 13:40:11 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfkAR-0001K5-Ls for linux-arm-kernel@lists.infradead.org; Thu, 19 Nov 2020 13:40:09 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F3F0B1042; Thu, 19 Nov 2020 05:40:05 -0800 (PST) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 612533F718; Thu, 19 Nov 2020 05:40:05 -0800 (PST) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/2] arm64: Support Enhanced PAN Date: Thu, 19 Nov 2020 13:39:51 +0000 Message-Id: <20201119133953.15585-1-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201119_084008_282879_23FA4493 X-CRM114-Status: GOOD ( 10.96 ) 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: catalin.marinas@arm.com, keescook@chromium.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi ARM architecture gains support of Enhanced Privileged Access Never (EPAN) which allows Privileged Access Never to be used with Execute-only mappings. As a consequence 24cecc377463 ("arm64: Revert support for execute-only user mappings") can be revisited and re-enabled. Changelog: RFC -> v1 - removed cap check in pte_valid_not_user (per Catalin) - local_flush_tlb_all() in cpu_enable_epan() (per Catalin) - reordered with CnP (per Catalin) - s/HWCAP2_EPAN/HWCAP2_EXECONLY/ (per Catalin) Thanks! Vladimir Murzin (2): arm64: Support execute-only permissions with Enhanced PAN arm64: Introduce HWCAPS2_EXECONLY arch/arm64/Kconfig | 17 +++++++++++++++++ arch/arm64/include/asm/cpucaps.h | 5 +++-- arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/asm/pgtable-prot.h | 5 +++-- arch/arm64/include/asm/pgtable.h | 14 +++++++++++++- arch/arm64/include/asm/sysreg.h | 2 ++ arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 24 ++++++++++++++++++++++++ arch/arm64/kernel/cpuinfo.c | 1 + arch/arm64/mm/fault.c | 3 +++ 10 files changed, 68 insertions(+), 5 deletions(-)