]> git.baikalelectronics.ru Git - kernel.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)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 29 Jun 2018 19:23:40 +0000 (21:23 +0200)
commit6e42115839233195ebae1747931ad8dc5e390e75
tree286125cde4ac83d006bce769c9b52060c365ab84
parentce9231ee465ee795514682f67837b6d639a11be6
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: f68b2db9f434 ("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>
arch/x86/include/asm/pgtable.h