]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mm/cpa: Fix set_mce_nospec()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 8 Feb 2019 12:08:59 +0000 (13:08 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 8 Feb 2019 13:31:56 +0000 (14:31 +0100)
commita83536154126b669aed92a253467e7a1ff446c52
tree8310e4114dde040bc1b5080e13b7143c1d56bafe
parenta3e05b71c4ff6aad1cd51c7a3561ad39b6a85719
x86/mm/cpa: Fix set_mce_nospec()

The recent commit 94dee1651e51 ("x86/mm/cpa: Fold cpa_flush_range() and
cpa_flush_array() into a single cpa_flush() function") accidentally made
the call to make_addr_canonical_again() go away, which breaks
set_mce_nospec().

Re-instate the call to convert the address back into canonical form right
before invoking either CLFLUSH or INVLPG. Rename the function while at it
to be shorter (and less MAGA).

Fixes: 94dee1651e51 ("x86/mm/cpa: Fold cpa_flush_range() and cpa_flush_array() into a single cpa_flush() function")
Reported-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Tony Luck <tony.luck@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Rik van Riel <riel@surriel.com>
Link: https://lkml.kernel.org/r/20190208120859.GH32511@hirez.programming.kicks-ass.net
arch/x86/mm/pageattr.c