summaryrefslogtreecommitdiffstats
path: root/drivers/eisa
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-13 15:48:23 -0700
committerThomas Gleixner <tglx@linutronix.de>2018-06-20 19:09:59 +0200
commit2f22b4cd45b67b3496f4aa4c7180a1271c6452f6 (patch)
treed825bf38c1beb5a30ba4d9440ee91e4b3fdc4124 /drivers/eisa
parentbcd11afa7adad8d720e7ba5ef58bdcd9775cf45f (diff)
downloadblackbird-obmc-linux-2f22b4cd45b67b3496f4aa4c7180a1271c6452f6.tar.gz
blackbird-obmc-linux-2f22b4cd45b67b3496f4aa4c7180a1271c6452f6.zip
x86/speculation/l1tf: Protect swap entries against L1TF
With L1 terminal fault the CPU speculates into unmapped PTEs, and resulting side effects allow to read the memory the PTE is pointing too, if its values are still in the L1 cache. For swapped out pages Linux uses unmapped PTEs and stores a swap entry into them. To protect against L1TF it must be ensured that the swap entry is not pointing to valid memory, which requires setting higher bits (between bit 36 and bit 45) that are inside the CPUs physical address space, but outside any real memory. To do this invert the offset to make sure the higher bits are always set, as long as the swap file is not too big. Note there is no workaround for 32bit !PAE, or on systems which have more than MAX_PA/2 worth of memory. The later case is very unlikely to happen on real systems. [AK: updated description and minor tweaks by. Split out from the original patch ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Andi Kleen <ak@linux.intel.com> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Dave Hansen <dave.hansen@intel.com>
Diffstat (limited to 'drivers/eisa')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud