All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH 8/8] L1TFv8 6
Date: Mon, 25 Jun 2018 13:31:54 -0700	[thread overview]
Message-ID: <20180625203154.GB19456@tassilo.jf.intel.com> (raw)
In-Reply-To: <ed73823d-2666-b6c8-7a54-97c4cc8bc0ed@suse.cz>

On Mon, Jun 25, 2018 at 09:04:34AM +0200, speck for Vlastimil Babka wrote:
> On 06/22/2018 06:56 PM, speck for Andi Kleen wrote:
> >> Because the macro machinery doesn't expect the arch-dependent swap entry
> >> format to be 32bit and pte to be 64bit, the results is even more macros,
> >> sorry about that.
> > 
> > Seems ugly and complicated. Perhaps it's better to just sacrifice the three bits.
> > Doubt anyone will really need it anyways, especially not on 32bit systems.
> 
> What three bits? You seem to be confusing this with my previous fix for
> 64bit max swap size, but this is something quite different.

You're right.

> 
> Before this patch, PAE code did not flip the offset bits, and was using
> the high pte word. That means bits 32-36 for type, 37-63 for offset.
> Lower word was zeroed, thus systems with 4GB or less memory should be
> safe, for 4GB to 128GB the swap type controls the "vulnerable" memory
> locations, above that also the offset. Is it correct that 32bit PAE HW
> phys limit is 64GB, but in the virtualized 32bit-pae guest on 64bit HW
> (that you were concerned about) that limit doesn't apply?

AFAIK it never applies on modern systems.

> 
> Now if we put the swap entry to the lower word starting with bit 9 (like
> 64bit), with 5 bits type we have 18 bits left for swap offset. That's
> just one 1GB. In the high word we have bits to avoid for L1TF (40 to 51
> at least?) so that's even worse. IMHO we have to use the whole 64bit
> entry then, which is what the patch does.

Ok.

-Andi

  reply	other threads:[~2018-06-25 20:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 22:48 [MODERATED] [PATCH 0/8] L1TFv8 2 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 1/8] L1TFv8 0 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 2/8] L1TFv8 4 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 3/8] L1TFv8 5 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 4/8] L1TFv8 8 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 5/8] L1TFv8 3 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 6/8] L1TFv8 7 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 7/8] L1TFv8 1 Andi Kleen
2018-06-13 22:48 ` [MODERATED] [PATCH 8/8] L1TFv8 6 Andi Kleen
     [not found] ` <20180614150632.E064C61183@crypto-ml.lab.linutronix.de>
2018-06-21  9:02   ` [MODERATED] " Vlastimil Babka
2018-06-21 11:43     ` Vlastimil Babka
2018-06-21 13:17       ` Vlastimil Babka
2018-06-21 14:38         ` Michal Hocko
2018-06-21 14:38         ` Thomas Gleixner
2018-06-21 20:32         ` [MODERATED] " Andi Kleen
2018-06-22 15:46       ` Vlastimil Babka
2018-06-22 16:56         ` Andi Kleen
2018-06-25  7:04           ` Vlastimil Babka
2018-06-25 20:31             ` Andi Kleen [this message]
2018-06-26 12:01               ` Vlastimil Babka
2018-06-26 12:57                 ` Michal Hocko
2018-06-26 13:05                   ` Michal Hocko
2018-06-27  9:14                 ` Thomas Gleixner
     [not found] ` <20180613225434.1CDC8610FD@crypto-ml.lab.linutronix.de>
2018-06-27 15:51   ` [MODERATED] Re: x86/speculation/l1tf: Protect PROT_NONE PTEs against speculation Michal Hocko
2018-06-28  8:05     ` [MODERATED] Re: [PATCH 4/8] L1TFv8 8 Vlastimil Babka
2018-06-29 12:22       ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180625203154.GB19456@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=speck@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.