]> www.infradead.org Git - users/jedix/linux-maple.git/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)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sat, 11 Aug 2018 00:44:55 +0000 (20:44 -0400)
commit793766a7699a102ec875a54e0ffb6a2d9893055d
treee65c1d9605bb52b180f3a0f8de501eade7ae12fc
parent5ec9cb80a64aeee004f6067c1f2e2f4c7b48a4b7
x86/mm/kmmio: Make the tracer robust against L1TF

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>
(cherry picked from commit 1063711b57393c1999248cccb57bebfaf16739e7)

Orabug: 28220674
CVE: CVE-2018-3620

Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/mm/kmmio.c