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=-12.0 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 D4859C433E6 for ; Fri, 12 Mar 2021 17:40:10 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 7A45064F0F for ; Fri, 12 Mar 2021 17:40:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A45064F0F 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc: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=raiKbY7AHoCPmGO4+VTFt7LNReitusrlXdQjEdy6YwY=; b=jtOW2In0DXX2h5Zu22htmNqzso 3jsJFOU2QGHmB8DVzqmmjWRdC8CIYrf8LZGLAFH+p+Tt40eJ3Rj/LpAHY/vJVZOqXy8jKuA3OGHgI jwI4V2d4zfYAqF0/7dupVooMK0DfwccM07IVpiE2DvIuKyqEhk701aFhsF7URNxsgEvbNMfBhk/ut QdYZ9Vv4kO9dlBasMZsGA3nycD4ZkNa62rAOcrvMwf4Gy2hbGpPCP2HJfl01Nbj6khTs98aIUpKWn IRDwNDWEwenmYv4egQaEoSyExUJvIXJpmZDBGjaRwu5l+PHv5BAAbbcWPRACRuAD+TsG2bpXsbSL3 uxLVrcMQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKlkF-00C6Og-Iy; Fri, 12 Mar 2021 17:38:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKlkB-00C6Nx-Rj for linux-arm-kernel@lists.infradead.org; Fri, 12 Mar 2021 17:38:37 +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 7AA651FB; Fri, 12 Mar 2021 09:38:31 -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 AF7433F7D7; Fri, 12 Mar 2021 09:38:30 -0800 (PST) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Cc: keescook@chromium.org, dave.martin@arm.com, catalin.marinas@arm.com, will@kernel.org Subject: [PATCH v4 0/2] arm64: Support Enhanced PAN Date: Fri, 12 Mar 2021 17:38:09 +0000 Message-Id: <20210312173811.58284-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-20210312_173836_068215_916AC821 X-CRM114-Status: UNSURE ( 7.15 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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) v1 -> v2 - rebased on for-next/uaccess (for INIT_SCTLR_EL1_MMU_ON) - moved EPAN enable to proc.S (via INIT_SCTLR_EL1_MMU_ON), so no need in enable method from cpufeature, no need to keep ordering relative to CnP (per Catalin) v2 -> v3 - rebased on 5.11-rc4 v3 -> v4 - rebased on 5.12-rc2 - restore comments around pte_valid_not_user and protection_map[] (per Will) - rework the vm_flags initialisation (per Will) - moved logic of pte_valid_user() into pte_access_permitted() (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 | 3 ++- arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/asm/pgtable-prot.h | 5 +++-- arch/arm64/include/asm/pgtable.h | 31 ++++++++++++++++++++------- arch/arm64/include/asm/sysreg.h | 4 +++- arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 15 +++++++++++++ arch/arm64/kernel/cpuinfo.c | 1 + arch/arm64/mm/fault.c | 18 +++++++++++++++- mm/mmap.c | 6 ++++++ 11 files changed, 89 insertions(+), 13 deletions(-) -- 2.24.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel