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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4CE83C00140 for ; Mon, 8 Aug 2022 13:27:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To: Date:From:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=SqlhZ0rT/FjRSCdE46EqUASpHAieMRVHVDig77ejyAQ=; b=It9L7bqGnXAs2g VGv2vGpJUcHLgSbCDAZAwRYVCHflXRQsfij8/mX46DqmTqhQsCjZmVnojQOnYxu6qAj3iCtVeGYOr b0pkfT0Wvn9BR0E1qQlRBGpU3AMRK8TS46uylmtCPggkcGI6AnwZUnWJb/xzPH4nRcGMFWGFBKci8 ApgyQHvgzHWPgB6TAgXUpKRo3xDflq6rxV07hYvlM3EQ4Tte2XQSzPrjTuTL2qwG7wzH9I1hgpeWZ 42Sb5V1r3W/nN6AJl3c/uJxG/xALna1xGGsAfZ4b4L84fpEQAYH7WGznyDo9NPO9sotGXlP9ky6GH c95pqmvGxvsMcK5fM1Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oL2lw-00E4VO-TR; Mon, 08 Aug 2022 13:26:21 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oL2lj-00E4Pg-Bc for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2022 13:26:09 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E2ADB6121D; Mon, 8 Aug 2022 13:26:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEEAEC433C1; Mon, 8 Aug 2022 13:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659965166; bh=C2qF2UNy7ag272HQx0oWE22qsvXMgIMsoa1m9t9GS1o=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=2oBGC22MH+h6k01xiSa9X1Ew/OoIlOqn8zYuiJv6k5LybaplTXDnel5nDDDR99kcr fC585Z5DepjmkrotNZwGsMf4C+sIQX1Y46t6imEB4HEsdJYWk3wqRKBYuO/2Gs+Vrp daVGFJKGo5hNXQwrtcTyeNr/4BQrSe2Q9Utb7PSc= Subject: Patch "arm64: set UXN on swapper page tables" has been added to the 5.19-stable tree To: ardb@kernel.org,catalin.marinas@arm.com,gregkh@linuxfoundation.org,linux-arm-kernel@lists.infradead.org,pcc@google.com,will@kernel.org Cc: From: Date: Mon, 08 Aug 2022 15:26:03 +0200 In-Reply-To: <20220808125321.32598-1-will@kernel.org> Message-ID: <1659965163216153@kroah.com> MIME-Version: 1.0 X-stable: commit X-Patchwork-Hint: ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220808_062607_505839_FF89718E X-CRM114-Status: GOOD ( 18.45 ) 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 This is a note to let you know that I've just added the patch titled arm64: set UXN on swapper page tables to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm64-set-uxn-on-swapper-page-tables.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From will@kernel.org Mon Aug 8 15:23:59 2022 From: Will Deacon Date: Mon, 8 Aug 2022 13:53:21 +0100 Subject: arm64: set UXN on swapper page tables To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Collingbourne , stable@vger.kernel.org, Will Deacon , Ard Biesheuvel , Catalin Marinas Message-ID: <20220808125321.32598-1-will@kernel.org> From: Peter Collingbourne [ This issue was fixed upstream by accident in c3cee924bd85 ("arm64: head: cover entire kernel image in initial ID map") as part of a large refactoring of the arm64 boot flow. This simple fix is therefore preferred for -stable backporting ] On a system that implements FEAT_EPAN, read/write access to the idmap is denied because UXN is not set on the swapper PTEs. As a result, idmap_kpti_install_ng_mappings panics the kernel when accessing __idmap_kpti_flag. Fix it by setting UXN on these PTEs. Fixes: 18107f8a2df6 ("arm64: Support execute-only permissions with Enhanced PAN") Cc: # 5.15 Link: https://linux-review.googlesource.com/id/Ic452fa4b4f74753e54f71e61027e7222a0fae1b1 Signed-off-by: Peter Collingbourne Acked-by: Will Deacon Cc: Ard Biesheuvel Cc: Catalin Marinas Link: https://lore.kernel.org/r/20220719234909.1398992-1-pcc@google.com Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/kernel-pgtable.h | 4 ++-- arch/arm64/kernel/head.S | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) --- a/arch/arm64/include/asm/kernel-pgtable.h +++ b/arch/arm64/include/asm/kernel-pgtable.h @@ -103,8 +103,8 @@ /* * Initial memory map attributes. */ -#define SWAPPER_PTE_FLAGS (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED) -#define SWAPPER_PMD_FLAGS (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S) +#define SWAPPER_PTE_FLAGS (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED | PTE_UXN) +#define SWAPPER_PMD_FLAGS (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S | PMD_SECT_UXN) #if ARM64_KERNEL_USES_PMD_MAPS #define SWAPPER_MM_MMUFLAGS (PMD_ATTRINDX(MT_NORMAL) | SWAPPER_PMD_FLAGS) --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -285,7 +285,7 @@ SYM_FUNC_START_LOCAL(__create_page_table subs x1, x1, #64 b.ne 1b - mov x7, SWAPPER_MM_MMUFLAGS + mov_q x7, SWAPPER_MM_MMUFLAGS /* * Create the identity mapping. Patches currently in stable-queue which might be from will@kernel.org are queue-5.19/arm64-set-uxn-on-swapper-page-tables.patch queue-5.19/crypto-arm64-poly1305-fix-a-read-out-of-bound.patch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel