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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 16:13:01 +0000 (18:13 +0200)
commitd4c1ad0615ff7fd078870791446745442f969798
treef16af18a1e033b6958c68e75e9063fd3f9d4873c
parenta5f284feeb2071f4a381fccf1c8c9b3e05b7a465
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/pgtable.h