]> git.hungrycats.org Git - linux/commit
x86/mm/kmmio: Make the tracer robust against L1TF
authorAndi Kleen <ak@linux.intel.com>
Tue, 7 Aug 2018 22:09:38 +0000 (15:09 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:10:06 +0000 (04:10 +0100)
commite2ec50b1272c238735ebf48a25020676818aef79
tree2c6d505c850175a5f6658e514f56d820b34e711d
parent308ad2888759478ed11dc989e8538c621046b811
x86/mm/kmmio: Make the tracer robust against L1TF

commit 1063711b57393c1999248cccb57bebfaf16739e7 upstream.

The mmio tracer sets io mapping PTEs and PMDs to non present when enabled
without inverting the address bits, which makes the PTE entry vulnerable
for L1TF.

Make it use the right low level macros to actually invert the address bits
to protect against L1TF.

In principle this could be avoided because MMIO tracing is not likely to be
enabled on production machines, but the fix is straigt forward and for
consistency sake it's better to get rid of the open coded PTE manipulation.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/mm/kmmio.c