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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no 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 EA8ABC5DF62 for ; Wed, 6 Nov 2019 12:12:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B303A214D8 for ; Wed, 6 Nov 2019 12:12:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dfXNNh2q"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sirena.org.uk header.i=@sirena.org.uk header.b="v5ISAo1a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B303A214D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8FqN3p9LvCVIPknxAGf3jmSlh90DynEwiU8AiGY3Xr8=; b=dfXNNh2qhOKFhcyYDpu7X/Wjf 0IHcub8LXGRen7dlkOiqirGN48wMIsyWmQMOxzsCLUDl6R33jckVAMrTmvQjAcKVGUl/fxSI3XA7o p5yjNs5j/a+AGZPNtudN+3GSHAyRWCOymZhwbhbQOHE2HzXx+1UV1OczyKd1nDsfcSeIBTlzvu7j8 KkpL1wMVa4zfL29wvc75/i9c5d0AsHJv+1B2p1ZCamP6xCoKy86Yxs8tY1WwDYaO/B3FSmh5iqXiN dGhjPo46fxjHBFtdZllFOeBfrnUedD7ImyDad5x1mLcBE8pHjkj0SQvHmepoxV2tCk+fmo5aQ+89J 5T0hNWBhA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSKB3-0008FA-97; Wed, 06 Nov 2019 12:12:45 +0000 Received: from heliosphere.sirena.org.uk ([172.104.155.198]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSKAz-0008Ek-Rx for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2019 12:12:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ji2Pe9gixDyKl4Atfn3D9teopwuObzCPHyEn6v8Of40=; b=v5ISAo1abNjJhx5NLN6ZWLuhX Y+8bDgPhpLbrKUAwZY61CC56Z37HIfTFLg9fDCUYJu88YjaHyDFcYdAiVHLZ4mNItnKMISnbYbAgb 6eSZNAPPvpM8zfHky7YOvcpQbPJFKvvM+/ONDH3qTvsOLDXe465tx9bFBJelThCyOordE=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iSKAw-0001N9-1R; Wed, 06 Nov 2019 12:12:38 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id ED4962743035; Wed, 6 Nov 2019 12:12:36 +0000 (GMT) Date: Wed, 6 Nov 2019 12:12:36 +0000 From: Mark Brown To: Catalin Marinas Subject: Re: [PATCH v6 4/4] arm64: Use a variable to store non-global mappings decision Message-ID: <20191106121236.GA4544@sirena.co.uk> References: <20191105214854.30725-1-broonie@kernel.org> <20191105214854.30725-5-broonie@kernel.org> <20191106102428.GE21133@arrakis.emea.arm.com> MIME-Version: 1.0 In-Reply-To: <20191106102428.GE21133@arrakis.emea.arm.com> X-Cookie: No line available at 300 baud. User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191106_041241_948427_721F4B20 X-CRM114-Status: GOOD ( 12.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============0229485317678834644==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0229485317678834644== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 06, 2019 at 10:24:28AM +0000, Catalin Marinas wrote: > On Tue, Nov 05, 2019 at 09:48:54PM +0000, Mark Brown wrote: > > + /* > > + * If know now we are going to need KPTI then use non-global > > + * mappings from the start, avoiding the cost of rewriting > > + * everything later. > > + */ > > + arm64_use_ng_mappings = kaslr_requires_kpti(); > This really needs to be done before map_kernel() and map_mem() in > paging_init(). Tested this series and most of the linear map does not > have the nG bit when it should (/sys/kernel/debug/kernel_page_tables). Hrm, right. That was getting hidden in the other noise in the diffs (I've been mainly checking that I was getting similar page tables between the various configurations in hetrogenous systems). It looks like anywhere paging_init() is too late, the reordering you suggest still leaves some stray non-global mappings. I've moved it to the start of setup_arch() which seems early enough. --FCuugMFkClbJLl1L Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl3CuLMACgkQJNaLcl1U h9CGQAf+Or37fCFTpR3Z6pp4/7bKwXfl/GG96Dh34L8SrKA+G8cvtrUkpkAB1Sgg +qaj6WJjHN8oJfiNjGD5sy1lxzxva4Gqoubp0sIm8AV6AJPP0ZomVUmscHiCBsQS PXvA3Hxju7xZSs6f5WgxyZeolD33GZutKfO9DBXiNrzirbbix9HeD5ssGlAn2Zeg d7jYUMt9n/E/HcpF/pJsFsQe7QpLBSJuP+aLYyZKIl0v5bupm6bwuyOUuvtIPBXv x1rOGzvB6OY/doZt7lTLYg1BKk/dsWVpW+XvH10CWJ3UlHK6AhMNH4/wwnPQ2fEx MlScTExzLYtEDOUUiMjqDO6fH22giA== =ZFBu -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L-- --===============0229485317678834644== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0229485317678834644==--