Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4006609pxu; Mon, 12 Oct 2020 07:11:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC5K62ELpL/F182kyOTuD1bhEp8vBdCdBTv+2UVaPE8ELcaR3/JyzkGNFrhL46pSC4X3MM X-Received: by 2002:a50:ec88:: with SMTP id e8mr14054892edr.277.1602511915098; Mon, 12 Oct 2020 07:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602511915; cv=none; d=google.com; s=arc-20160816; b=Dq400qDpo4NZ2RVXGkMv/6rehKasXorB6AgCpjDaIM7Mw9xEO44jyfBDVSy7nqjfNg KDydjMwMCgXGK2guyien6K05K4wYkaZAD3aOSi99URARPs82qp82A2yPbmA4Dl2tnSL6 HONBolFfhWJ2KEECvg11hcQ+2PsB6XCIhrr/RDsn/lZVWU4UcSnEnhmenJFRcWgW+zIi 5lw1Cx7CIMxHV2n0WHWtW+Fc7Z/X0izhY/RUgPmRRsXtbopUej34OycNm5FgU3rF+pmz bpHMELKCnJB6BBJLS0P4S+Y1qcp8b8oowTY3m3Et07qzg6XBeyu/mFh3kw3YI7P1AcRK 3beA== 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:ironport-sdr :ironport-sdr; bh=z9ceCpMinxwv1TLlErprrxpkurV+qUbwlVu9iTQ60wg=; b=0AYTbJqIvEDRL020d/+jDI8U7xPtDo2mFzdp8EHiKUP1clWNAUxr/53KiHHYFkjdNd 206WHcpUUFRs7tj79SweJlfRG4acphpP/mponlOYRi5gIlvxjEw6RXwr25INpOvlFMB6 rvXYO2vWSh5z9dF6bu+2boDXQMlU1/pcYyPCFemGTwXWUY/uDnoSqeRmd/dJVRuF3YBg Evl8Xy1GtRG/i3AhNAsj+3B2IgISsafakhR0cJZ2Et/qSE7LL8ZKDVWjxMsraxP7qn1/ r8cGeFnxAEM/Q5pyID7crlxpFjMyyKxsw76F0W4bt9mPPvclUg2Ye7gZSghScP76cieu gx3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd12si10959784ejb.745.2020.10.12.07.11.31; Mon, 12 Oct 2020 07:11:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731889AbgJLOIq (ORCPT + 99 others); Mon, 12 Oct 2020 10:08:46 -0400 Received: from mga05.intel.com ([192.55.52.43]:56827 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731799AbgJLOIe (ORCPT ); Mon, 12 Oct 2020 10:08:34 -0400 IronPort-SDR: YkfdJNv7f51CxYKqkUq4TDfpBFt7HnIZdcW6RBy9hOIjWS1Y2vyW0r40vr0pGpZV+rbK7pgqgO 3SEju5/lnwyg== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="250439094" X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="250439094" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 07:08:33 -0700 IronPort-SDR: wbAGRGWAXQa1ibfUea/jP7QJf6mUAd5tHGdH8L/hm79dKaKdKhvacleFkl0isuM7S5/3jrGBr8 cTM3t7JAxeEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="356628626" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 12 Oct 2020 07:08:31 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 0A663150; Mon, 12 Oct 2020 17:08:30 +0300 (EEST) Date: Mon, 12 Oct 2020 17:08:30 +0300 From: "Kirill A. Shutemov" To: Arvind Sankar Cc: x86@kernel.org, Joerg Roedel , Borislav Petkov , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/boot/64: Initialize 5-level paging variables earlier Message-ID: <20201012140830.vrc25x2gwo7yo4kn@black.fi.intel.com> References: <20201008191623.2881677-1-nivedita@alum.mit.edu> <20201010191110.4060905-1-nivedita@alum.mit.edu> <20201010192624.GA4062867@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201010192624.GA4062867@rani.riverdale.lan> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 10, 2020 at 03:26:24PM -0400, Arvind Sankar wrote: > On Sat, Oct 10, 2020 at 03:11:10PM -0400, Arvind Sankar wrote: > > Commit > > ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table") > > started using a new set of pagetables even without KASLR. > > > > After that commit, initialize_identity_maps() is called before the > > 5-level paging variables are setup in choose_random_location(), which > > will not work if 5-level paging is actually enabled. > > Note that I don't have hardware that supports 5-level paging, so this > is not actually tested with 5-level, but based on code inspection, it > shouldn't work. qemu supports it. -cpu "qemu64,+la57" -- Kirill A. Shutemov