summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/fixmap.h
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2019-09-14 00:14:02 +0300
committerIngo Molnar <mingo@kernel.org>2019-10-11 13:52:32 +0300
commitf53e2cd0b8ab7d9e390414470bdbd830f660133f (patch)
treea29b5460e3a96c0b6a94b0e40e44f61d00751966 /arch/x86/include/asm/fixmap.h
parent6e4847640c6aebcaa2d9b3686cecc91b41f09269 (diff)
downloadlinux-f53e2cd0b8ab7d9e390414470bdbd830f660133f.tar.xz
x86/mm: Use the correct function type for native_set_fixmap()
We call native_set_fixmap indirectly through the function pointer struct pv_mmu_ops::set_fixmap, which expects the first parameter to be 'unsigned' instead of 'enum fixed_addresses'. This patch changes the function type for native_set_fixmap to match the pointer, which fixes indirect call mismatches with Control-Flow Integrity (CFI) checking. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: H . Peter Anvin <hpa@zytor.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@surriel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20190913211402.193018-1-samitolvanen@google.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/fixmap.h')
-rw-r--r--arch/x86/include/asm/fixmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h
index 0c47aa82e2e2..28183ee3cc42 100644
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -156,7 +156,7 @@ extern pte_t *kmap_pte;
extern pte_t *pkmap_page_table;
void __native_set_fixmap(enum fixed_addresses idx, pte_t pte);
-void native_set_fixmap(enum fixed_addresses idx,
+void native_set_fixmap(unsigned /* enum fixed_addresses */ idx,
phys_addr_t phys, pgprot_t flags);
#ifndef CONFIG_PARAVIRT_XXL