x86/paravirt: Fix tlb_remove_table function callback prototype warning
authorKees Cook <keescook@chromium.org>
Wed, 26 Jul 2023 23:11:43 +0000 (16:11 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 3 Aug 2023 22:41:56 +0000 (15:41 -0700)
commitfcce1c6cb156d79debaf84f63233f146540031b1
tree03f5de1de1341e7d5f04bc0ea4325fd83500d8a3
parentb6ed2f7758a558485ff889b4a3912fcb6abcf689
x86/paravirt: Fix tlb_remove_table function callback prototype warning

Under W=1, this warning is visible in Clang 16 and newer:

arch/x86/kernel/paravirt.c:337:4: warning: cast from 'void (*)(struct mmu_gather *, struct page *)' to 'void (*)(struct mmu_gather *, void *)' converts to incompatible function type [-Wcast-function-type-strict]
                           (void (*)(struct mmu_gather *, void *))tlb_remove_page,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add a direct wrapper instead, which will make this warning (and
potential KCFI failures) go away.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307260332.pJntWR6o-lkp@intel.com/
Cc: Juergen Gross <jgross@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Ajay Kaher <akaher@vmware.com>
Cc: Alexey Makhalov <amakhalov@vmware.com>
Cc: VMware PV-Drivers Reviewers <pv-drivers@vmware.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: virtualization@lists.linux-foundation.org
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20230726231139.never.601-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
arch/x86/kernel/paravirt.c