]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/speculation/l1tf: Fix up pte->pfn conversion for PAE
authorMichal Hocko <mhocko@suse.cz>
Wed, 27 Jun 2018 15:46:50 +0000 (17:46 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sat, 11 Aug 2018 00:44:36 +0000 (20:44 -0400)
commit0fbe5ad55a1938132ed053a068e26fbcec62de03
treebae49ce0a09096a8c5671a2f06d80cb95317920a
parentab50e36746e97ece8b087a7093e6fc44e6ba2e08
x86/speculation/l1tf: Fix up pte->pfn conversion for PAE

Jan has noticed that pte_pfn and co. resp. pfn_pte are incorrect for
CONFIG_PAE because phys_addr_t is wider than unsigned long and so the
pte_val reps. shift left would get truncated. Fix this up by using proper
types.

Fixes: 6b28baca9b1f ("x86/speculation/l1tf: Protect PROT_NONE PTEs against speculation")
Reported-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Orabug: 28220674
CVE: CVE-2018-3620

(cherry picked from commit e14d7dfb41f5807a0c1c26a13f2b8ef16af24935)

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>
Conflicts:
arch/x86/include/asm/pgtable.h
Contextual and we do not have pfn_pud.
arch/x86/include/asm/pgtable.h