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 E554DC77B7C for ; Fri, 26 May 2023 09:34:25 +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=aHToZpTnppVg7U7kd0qAbcYz4FfRn9JoKBWNmuUZwII=; b=t771NAR+whVtZS 8BcPEF1PsTnvD7RizAeC8IhgT55/TXjUbRUuCLG/VYZZhVXxxsd6GQqBG48fYL7opynl5fSoSuqLy jxvhjj3jdS08//6kNHypk/FnDqe3gj+dGq0X1lUAFEzKmX+TlRvnGhQu80nFQJo8DkfrSulrXwrkA 3zkG98L3bbFyHyQKX32ZDdfwAuSQweT31O+QMIlz69jDxDsCXorf41wQe2uawpTvCz4mS30fu1na1 IYfZ4bv5USyCasnUJB7SKuox77gzgEFU0lNTwvCZh+qRDGV5bsXJkhERiEPkzcSXROC5UBVfe7stK 0+FYjnGbbWxUGTjz0bkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q2Tpg-001pS1-2c; Fri, 26 May 2023 09:34:00 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q2Tpc-001pQh-1j for linux-arm-kernel@lists.infradead.org; Fri, 26 May 2023 09:33:58 +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 0B6E860DE8; Fri, 26 May 2023 09:33:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39B1DC433EF; Fri, 26 May 2023 09:33:53 +0000 (UTC) Date: Fri, 26 May 2023 10:33:50 +0100 From: Catalin Marinas To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, nd@arm.com, broonie@kernel.org, james.morse@arm.com, mark.rutland@arm.com, maz@kernel.org, oliver.upton@linux.dev, shuah@kernel.org, suzuki.poulose@arm.com, will@kernel.org, yuzenghui@huawei.com Subject: Re: [PATCH v3 11/20] arm64: add PTE_UXN/PTE_WRITE to SWAPPER_*_FLAGS Message-ID: References: <20230511110337.3385517-1-joey.gouly@arm.com> <20230511110337.3385517-12-joey.gouly@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230511110337.3385517-12-joey.gouly@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230526_023356_605318_AD343817 X-CRM114-Status: GOOD ( 12.80 ) 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 Thu, May 11, 2023 at 12:03:28PM +0100, Joey Gouly wrote: > With PIE enabled, the swapper PTEs would have a Permission Indirection Index > (PIIndex) of 0. A PIIndex of 0 is not currently used by any other PTEs. > > To avoid using index 0 specifically for the swapper PTEs, mark them as > PTE_UXN and PTE_WRITE, so that they map to a PAGE_KERNEL_EXEC equivalent. > > This also adds PTE_WRITE to KPTI_NG_PTE_FLAGS, which was tested by booting > with kpti=on. > > Signed-off-by: Joey Gouly > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland It looks fine now. Reviewed-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel