Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6069734imm; Mon, 27 Aug 2018 09:08:51 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaf0230H01/LWoRG6lF5yQms3Gp/JZBFp/kN2sfSduKPnEI3mjo4E1Y+AmP2/0pHPQlaoBy X-Received: by 2002:a63:549:: with SMTP id 70-v6mr13152627pgf.385.1535386131828; Mon, 27 Aug 2018 09:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535386131; cv=none; d=google.com; s=arc-20160816; b=Idwpw3TEhjl1NtqonijFyQ4kW7nwNLhScMdDf1HFRaoIZ08Ib5SaXyWGF6J+P0cRd8 p6Kt6+mzXmvs1yheuBfwnkxTbTzUWKt55Dgw3s0gRj4OiK0O2qyFjVxMMJX2g+42h2zZ Sh9b7Hu5hcBvI/q/Ykq+iuTx0OHwuJJq+V1RkiUGL5BKj1a/j+/39s/ky/Z0Oo23WsFy lfeYwJYx+3H4JMCyy9Ugp5/z8kRyWxTqnTR744Ohh8bfzoNOwg6kxqA3/f55RwsKwD4E ooHJmGWrzU/PbuSa1KCrGZMnYOY48eS4XvOKEcqqB/oXXmxwKYj8s8/R51BtfuF2YfHV jFFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=ditRqlRrj18LC77XfO6ow3uOwxGoZIS5tDinhHKEV+I=; b=MiFECRJjcwwY3gDS4xpMlf1NOb4oqidNdRWZHAiShmzRW+jJ5iPf1c4Z6MYeouXW67 CAde5CNeEv9IURRIyYwTUeZfmVyG5WvavY5dzTd5OGfTg9kEM/Kqzosm4/XD5XmgKZk8 wvz4gHCw7k7YajtLY5eLObBnMybfefY2zk3Nl45Unl6aTupRRcozKa7dduySalcMdZoI gCixEo4ZjUR8G1x89R7EedvZhBP1G/8YMffhZ0uJ9XAMB7zKH5Hbvm87etuQnJlRu7sJ ZWcq0AeX4ter0LtQdArs8XS9bN7G7DWG8O5ZT50YNOODgN/KQYSAVhTFx8k91yHj+xVC xrIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s6fcQhwV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l24-v6si11857759pgj.158.2018.08.27.09.08.35; Mon, 27 Aug 2018 09:08:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s6fcQhwV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727306AbeH0Tyl (ORCPT + 99 others); Mon, 27 Aug 2018 15:54:41 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42181 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727026AbeH0Tyl (ORCPT ); Mon, 27 Aug 2018 15:54:41 -0400 Received: by mail-lj1-f194.google.com with SMTP id f1-v6so12820073ljc.9 for ; Mon, 27 Aug 2018 09:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ditRqlRrj18LC77XfO6ow3uOwxGoZIS5tDinhHKEV+I=; b=s6fcQhwVG3+XwHGQX5TiBC8jX8titB08pPHqFr3xRxeAgIIEKgrSlf7ZLL81dmMJeN TSa4mlvxtNOMWYbTB2sdB3NTdhYk7v0ikgm2UmjLDYgwnZlLSWYw9k/4g73QIhZ/6nOh 2+ALMyMAsejrV5BcIG5SWgrLn0ophc4Pj75GGu4bXXdk5kWZ0hwnHCJOcisRmABU/RI/ q817jw1whBOxGK+k7V1tWaxdARBWRwUzZKwzZ91RpOvotZgua1xZjFMNnKKYbMOdOATu Pr+WkSuENdQvH+PoXTgK1F4c6g8Ty/eNe7VVgUnvlfWQq/cdnS1Fpw2w0myoRjofkrc6 Fe0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ditRqlRrj18LC77XfO6ow3uOwxGoZIS5tDinhHKEV+I=; b=JbjecEE1fedaq/fmfmQcgN5+H9itw1K08gmDOtGPX8PAP3JKeJYWAvLTY6DawoOmEi 28JtB9BvfW7f2JpGjZiJfjsXPD6VdFE+wRlusLtNFuCh0ZAOOIKFUTtGTcI1V02RrhWL MxTfPBp1hiNFbqepDJC4SgmbSQo2cE3s3otXrYHCpDN4lP4CUHJVKOcrLGFUlLarqHaM PrY/b52nr/NB4P9godLfEFIf4fEUcvsBuFXVaAwgXWmJMsY5msqGaG3cOFMLKJqT7Op8 MG3S5jS/rLFgkAjI+L6BYoASDSvs/f0NxhmryB4jo1bDefEwfqafOHs6R2eo5GworFpf M87A== X-Gm-Message-State: APzg51DzXMzTco23o7zuIH2O11jJRw5CmBMKZ7qFv8vyHmjC/M5DGgb7 03RVB13p0WrOYVuxu4COErjXCzgoLZTGes7GhVA= X-Received: by 2002:a2e:93c4:: with SMTP id p4-v6mr8778038ljh.150.1535386046242; Mon, 27 Aug 2018 09:07:26 -0700 (PDT) MIME-Version: 1.0 References: <20180821153755.30462-1-jgross@suse.com> In-Reply-To: From: Jason Andryuk Date: Mon, 27 Aug 2018 12:07:14 -0400 Message-ID: Subject: Re: [Xen-devel] [PATCH v2 0/2] x86/xen: avoid 32-bit writes to PTEs in PV PAE guests To: Juergen Gross Cc: open list , xen-devel , x86@kernel.org, Boris Ostrovsky , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 27, 2018 at 12:03 PM Jason Andryuk wrote: > > On Tue, Aug 21, 2018 at 11:40 AM Juergen Gross wrote: > > > > While the hypervisor emulates plain writes to PTEs happily, this is > > much slower than issuing a hypercall for PTE modifcations. And writing > > a PTE via two 32-bit write instructions (especially when clearing the > > PTE) will result in an intermediate L1TF vulnerable PTE. > > > > Writes to PAE PTEs should always be done with 64-bit writes or via > > hypercalls. > > > > Juergen Gross (2): > > x86/xen: don't write ptes directly in 32-bit PV guests > > x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear > > > > I tested both patches on 4.14, changing patch 2 to atomic64_xchg since > arch_atomic64_xchg doesn't exist. > > I haven't seen https://bugzilla.kernel.org/show_bug.cgi?id=198497 > trigger since incorporating these patch. Without the patches, I would > have seen it trigger by now. Also, I've confirmed Xen does not enable > page table shadowing. For what it's worth, the PTEs that would > trigger Xen shadowing (0x8000'0002'0000'0000) are the same as those > that triggered bug 198497. There was at least 1 non-Xen user affected > by 198497, but this at least seems to fix it for me. > > Tested-by: Jason Andryuk Also, can these patches be Cc: stable@vger.kernel.org? Thanks, Jason