]> git.hungrycats.org Git - linux/commit
x86/speculation/l1tf: Make pmd/pud_mknotpresent() invert
authorAndi Kleen <ak@linux.intel.com>
Tue, 7 Aug 2018 22:09:37 +0000 (15:09 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:10:06 +0000 (04:10 +0100)
commit9c8c0995084eb87c0f634a16d4a05406f3d3a16f
tree57c2e6d27f7c6d73fb69695e9e38cf43c99d0405
parenta3129ae750bdf515e6bd437e08d2ad73dcb2476c
x86/speculation/l1tf: Make pmd/pud_mknotpresent() invert

commit 0768f91530ff46683e0b372df14fd79fe8d156e5 upstream.

Some cases in THP like:
  - MADV_FREE
  - mprotect
  - split

mark the PMD non present for temporarily to prevent races. The window for
an L1TF attack in these contexts is very small, but it wants to be fixed
for correctness sake.

Use the proper low level functions for pmd/pud_mknotpresent() to address
this.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bwh: Backported to 3.16:
 - Drop change to pud_mknotpresent()
 - pmd_mknotpresent() does not touch _PAGE_NONE]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/pgtable.h