Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4768253rwb; Mon, 8 Aug 2022 06:48:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ko/M/nZ5G1NvAkbOGzdlImTgSRCaApEppofBtCAGpXeIzOiADzTS06NsE1asNvzZp771r X-Received: by 2002:a63:e511:0:b0:41d:2c8d:e9f with SMTP id r17-20020a63e511000000b0041d2c8d0e9fmr9482340pgh.404.1659966531888; Mon, 08 Aug 2022 06:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659966531; cv=none; d=google.com; s=arc-20160816; b=K6uT4Q0GaGEPhREFXtPybLCwBuMAXUVUNwGe0hiv28rxLNdmge+BxUhH8V46rtjkNz MXox8fY/wY1c2P6p/KDEBzwsdNH8T4RSxwrscBK6O6RcRFPp/NIlSPBZGApuIZBJGbAt Orst/Nju32pfndCKqP0aSZKWGwODRlydU1ULNRrTGFuUsaskljG6tYxRJheFo/o0yE5A lkXKDH3nyFSrSbVoQUrsyf5a8ThT0cy9/UiPKRqtCxwzIQpxtV8hnsF/NPYogjmydHoM RhXZ5oPU0CJO/qaWZ/mraTb5Kq898U0mSJSp23penFWtTvchZo16X6KGPK/lPZadWcA/ VrxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=A8Ks4AJshS1f6h74tor35izM+8QsXfIvHqz1WnnFVuc=; b=wUO+NpwRyeXoVYYtxgZApmxbakj74tuWXr3lipcrK9zo1VicmRhp/9g4U7wnfiIS+e QnmtzYpXxvcVKe6g2I8BSR7NPNp18QwfvAwKDo3itzJsUDNc+hg1PiE/nhdQWaRbiMl9 6P9OARWl8gNov9dM3jqt4w58LiN5qdYzQCpBnejEBs59ec5sMteLTPGJQtSTqEuWU88r wVDgJ8yei5j8SLfUcWB8yH1sIJNeSP0BF9fR1unufyJIb7HLo1z7vUKsDhZCjlVXsczx pejJVRyLqACHHIDp6tvl8/D0HX7HpbgDgefdLbMoscaXWDvqkldS0IJeaGcmA7xkiWsm e7gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NsQjitbx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n23-20020a63f817000000b0041d9a9f2e7csi1917283pgh.646.2022.08.08.06.48.36; Mon, 08 Aug 2022 06:48:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NsQjitbx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243291AbiHHNYD (ORCPT + 99 others); Mon, 8 Aug 2022 09:24:03 -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> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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