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 9D673C47404 for ; Wed, 9 Oct 2019 17:52:21 +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 45BBC206BB for ; Wed, 9 Oct 2019 17:52:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G0hv19Zt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sirena.org.uk header.i=@sirena.org.uk header.b="Sf9dTA9O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45BBC206BB 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=x3Jo1DiXEG/Fsi346q4SPXZ50LbbT0Bj8/8EtkGaFec=; b=G0hv19Zt4gt/7VoMqsBnon9Jc riw28xZvnEpvNCbnRH46UBJN5vm87v9rEI1Oa/BtkRHzv3L1kZi2ieIRglYZ3B+r9IQO9NJVuSxCI mjfD9YhsjgPBMM4zINXNARDJVC/QAangYgejUwKk16R1RN3sRsQjO1QfkbqLLVI+KIyJjECILzYMY NXIgrWgz2OEnse2yTsq+OCkJ4bFt+oZryL++tDIZCUQXvOE7Yi9+FHV3AcL1qvqdT42iwsXbQ45NK q+KvdS9w1luAKqmb9Bg/4yFdW0seP+G1MBCrFAyQeGNQq56EsM5iioHZoFJ8sGE0Ad0wPVIs/T13R f58p+BdgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iIG8D-0000ZN-Gj; Wed, 09 Oct 2019 17:52:13 +0000 Received: from heliosphere.sirena.org.uk ([172.104.155.198]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iIG89-0000YD-Ms for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2019 17:52:11 +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=O6B1D1emCFTGBKvvaDeffda7qVt7QJWxOBMAzjGSfjE=; b=Sf9dTA9O4mIwLwMObG9CKmaUW +s+qHVtZYnygsRHT1i7+lnktsP5YoyHIkLsn0hzN4OIO2MhHQVKyds7ub4maAcnM/04bnNvk6u6Po DmUO4MnLfimanZIyA2agIIGypKE/rGmIPr4lWTAn6z1h1Ux8Bsi1C7bAnbpDOmyxNWnK0=; Received: from 188.31.199.195.threembb.co.uk ([188.31.199.195] helo=fitzroy.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 1iIG86-0005OV-Nw; Wed, 09 Oct 2019 17:52:06 +0000 Received: by fitzroy.sirena.org.uk (Postfix, from userid 1000) id 2C615D03ED3; Wed, 9 Oct 2019 18:52:05 +0100 (BST) Date: Wed, 9 Oct 2019 18:52:05 +0100 From: Mark Brown To: Suzuki K Poulose Subject: Re: [PATCH v2 2/2] arm64: Don't use KPTI where we have E0PD Message-ID: <20191009175205.GN2036@sirena.org.uk> References: <20190814183103.33707-1-broonie@kernel.org> <20190814183103.33707-3-broonie@kernel.org> <20190815163541.yngqvjmehpuf74ye@willie-the-truck> <20190816102424.GA28874@arrakis.emea.arm.com> <20190816121005.GB4039@sirena.co.uk> <6834da7b-553c-2ad3-9b05-25ca982252e9@arm.com> MIME-Version: 1.0 In-Reply-To: <6834da7b-553c-2ad3-9b05-25ca982252e9@arm.com> X-Cookie: Be careful! UGLY strikes 9 out of 10! 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-20191009_105209_761057_872EA315 X-CRM114-Status: GOOD ( 14.90 ) 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: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============4143220033653310848==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4143220033653310848== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s/WT9nMb2Y5oFLLC" Content-Disposition: inline --s/WT9nMb2Y5oFLLC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 24, 2019 at 10:13:18AM +0100, Suzuki K Poulose wrote: > On 16/08/2019 13:10, Mark Brown wrote: > > We definitely need some variable I think, and I think you're right that > > making the decision on the boot CPU would simplify things a lot. The > relocating the kernel. So, we may be able to perform "raw cpuid check" on > the boot CPU with MMU turned on, before we re-write the pagetables for KASLR > displacement and nG if that is needed (by maybe updating SWWAPPER_MMU_FLAGS) for > the boot CPU and store this information somewhere. Thus we may be able to > avoid another re-write of the pagetables after we have booted the secondaries. The boot CPU is straightforward, there is only an issue on the secondaries where IIRC the rewrite code needs some updates as we get left with non-global mappings lying around. > Discussing this with Catalin, he suggests to use a variable for the status > of "nG" flag for PTE/PMD_MAYBE_NG, to avoid calling the helper function > all the time. By using the per-CPU check we can make sure the flag is uptodate. That was the discussion about the variable above. We need one for non-optimization reasons anyway since we can't rely on checking the state on the current CPU. > Also, we can continue to fail the hotplugged CPUs if we detect that the > pagetables are Global and the new CPU requires nG (for heterogeneous > systems). There's no continuing to reject those CPUs unfortunately, we don't reject anything currently. Any such systems would experience a regression when moving to a kernel where E0PD is enabled which doesn't seem ideal. --s/WT9nMb2Y5oFLLC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl2eHkQACgkQJNaLcl1U h9CTkwf/cHqcorDdNFicvVzxww42HDOXi/zULA7DxwnLWPtA86Ya+2gUXILqtPYD 71dPloWVAllzCakzU6+QIyZwFb0JC0RtvcVzTKoJjMkUFPxGVbYXoexztS1vyJq7 tpPL1uuUAj7adK3g6TJAJ5FmGdV4aWHcspiLrCYOQJIifEEn5+3rWYoCu54HAy6Z a3HHgYGK1D5+5xz+fRE2FnEzUlns7KNrlLOburH2/1PjZp+9PcMFpqhnItoDOJjs znsueWCrxZRln5UkAqyjLMED06tIYlBaZNM2TYv6HFWAhXmP35+Q9GM6Izz1CzPt /NeAjsL3byAdTdm4YGYJNFBEBDoRnw== =eLIf -----END PGP SIGNATURE----- --s/WT9nMb2Y5oFLLC-- --===============4143220033653310848== 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 --===============4143220033653310848==--