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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3AC2C00140 for ; Mon, 8 Aug 2022 13:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242599AbiHHNYB (ORCPT ); Mon, 8 Aug 2022 09:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236301AbiHHNYA (ORCPT ); Mon, 8 Aug 2022 09:24:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE4E42DC0; Mon, 8 Aug 2022 06:23:59 -0700 (PDT) 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 489EE611EB; Mon, 8 Aug 2022 13:23:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ED75C433C1; Mon, 8 Aug 2022 13:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659965038; bh=YkyrKw26MEh+tZJyTS0AEH3Lyk3WA721wpslJzRMgcE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NsQjitbxJ+p2kwdhYNgnWuKxNlW6LyAL/PywNvcBJhtLkIVSUwvOjDFj2ZNpHOLD7 NO2DR+LTzOJx5Y6ctZLrh/YCYqQ0AUOxjoA9Xl/rhMLm1G29rmHwNF/C6/fw3vEF3c JmX7rrlXD906ClFTJBy6IViHUQlYCoUO004xzIZI= Date: Mon, 8 Aug 2022 15:23:55 +0200 From: Greg KH To: Will Deacon Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Collingbourne , stable@vger.kernel.org, Ard Biesheuvel , Catalin Marinas Subject: Re: [PATCH][for-stable] arm64: set UXN on swapper page tables Message-ID: References: <20220808125321.32598-1-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220808125321.32598-1-will@kernel.org> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Aug 08, 2022 at 01:53:21PM +0100, Will Deacon wrote: > 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 > --- > arch/arm64/include/asm/kernel-pgtable.h | 4 ++-- > arch/arm64/kernel/head.S | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) So this should be added to 5.15.y, 5.18.y, and 5.19.y? Or some subset? thanks, greg k-h 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 13C33C00140 for ; Mon, 8 Aug 2022 13:25:13 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qOxMVeSLcbfQ/+6b+AToNa4uc0DUM301muvCrX//JIU=; b=pMXiF3cKGOSXZa /W2/UWTVoTWvQzYt7h9iPnvM4R5iGQKjBdbfSpng+nTTqXzixRwi+i9TTngcMKtDpLfP2vixITCg+ sIjqa1wmtfIQDPX6keKiEBEf74mhaSrjFRXQFMH2dbsaECjp12qzCxVnXPpUcMv5lgfXd2S1ble4I OBrwlGwuG6qpn6+9PZPX+5xDvOcS29LB+8ZSDaeemF9gLgyxoQdMrXWkJcRHNEMmEuyL/0bXdWegc i/1FIknop4UNWmJvmRe11rcCgReUuleBlQqZySt1N2ubrIQ1zArA+Unl9Gbx6S1hOOSxJGZd3+y9O L+5vvfuelUJskhz9BMkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oL2jk-00E3Yp-Is; Mon, 08 Aug 2022 13:24:04 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oL2ji-00E3Xc-0k for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2022 13:24:03 +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 sin.source.kernel.org (Postfix) with ESMTPS id 3B4FACE10A2; Mon, 8 Aug 2022 13:24:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ED75C433C1; Mon, 8 Aug 2022 13:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659965038; bh=YkyrKw26MEh+tZJyTS0AEH3Lyk3WA721wpslJzRMgcE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NsQjitbxJ+p2kwdhYNgnWuKxNlW6LyAL/PywNvcBJhtLkIVSUwvOjDFj2ZNpHOLD7 NO2DR+LTzOJx5Y6ctZLrh/YCYqQ0AUOxjoA9Xl/rhMLm1G29rmHwNF/C6/fw3vEF3c JmX7rrlXD906ClFTJBy6IViHUQlYCoUO004xzIZI= Date: Mon, 8 Aug 2022 15:23:55 +0200 From: Greg KH To: Will Deacon Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Collingbourne , stable@vger.kernel.org, Ard Biesheuvel , Catalin Marinas Subject: Re: [PATCH][for-stable] arm64: set UXN on swapper page tables Message-ID: References: <20220808125321.32598-1-will@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220808125321.32598-1-will@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220808_062402_247740_99FA4C69 X-CRM114-Status: GOOD ( 18.05 ) 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 On Mon, Aug 08, 2022 at 01:53:21PM +0100, Will Deacon wrote: > 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 > --- > arch/arm64/include/asm/kernel-pgtable.h | 4 ++-- > arch/arm64/kernel/head.S | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) So this should be added to 5.15.y, 5.18.y, and 5.19.y? Or some subset? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel