]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/speculation/l1tf: Extend 64bit swap file size limit
authorVlastimil Babka <vbabka@suse.cz>
Thu, 21 Jun 2018 10:36:29 +0000 (12:36 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 10 Aug 2018 22:56:38 +0000 (18:56 -0400)
commitb0f572f32ff27a5868c4a67ff7127eca86c9d9b4
treed2af81801ef71acc19976d649373fa1f34ef886a
parent7c6e5b8e7ad1e14be54d895ce80314900ca49a01
x86/speculation/l1tf: Extend 64bit swap file size limit

The previous patch has limited swap file size so that large offsets cannot
clear bits above MAX_PA/2 in the pte and interfere with L1TF mitigation.

It assumed that offsets are encoded starting with bit 12, same as pfn. But
on x86_64, offsets are encoded starting with bit 9.

Thus the limit can be raised by 3 bits. That means 16TB with 42bit MAX_PA
and 256TB with 46bit MAX_PA.

Fixes: 377eeaa8e11f ("x86/speculation/l1tf: Limit swap file size to MAX_PA/2")
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Orabug: 28220674
CVE: CVE-2018-3620

(cherry picked from commit 1a7ed1ba4bba6c075d5ad61bb75e3fbc870840d6)

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/init.c