KVM: x86: Fix BUILD_BUG() in __cpuid_entry_get_reg() w/ CONFIG_UBSAN=y
Sean Christopherson authored
Take the target reg in __cpuid_entry_get_reg() instead of a pointer to a
struct cpuid_reg.  When building with -fsanitize=alignment (enabled by
CONFIG_UBSAN=y), some versions of gcc get tripped up on the pointer and
trigger the BUILD_BUG().
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Fixes: d8577a4c ("KVM: x86: Do host CPUID at load time to mask KVM cpu caps")
Fixes: 4c61534a

 ("KVM: x86: Introduce cpuid_entry_{get,has}() accessors")
Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200325191259.23559-1-sean.j.christopherson@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
855c7e9b
Name Last commit Last update
..
boot x86/boot/compressed: Don't declare __force_order in kaslr_64.c
configs x86: Remove the calgary IOMMU driver
crypto crypto: x86/poly1305 - emit does base conversion itself
entry kbuild: rename hostprogs-y/always to hostprogs/always-y
events perf/x86/intel: Fix inaccurate period in context switch for auto-reload
hyperv x86/hyperv: Suspend/resume the hypercall page for hibernation
ia32 x86: Remove force_iret()
include KVM: x86: Drop __exit from kvm_x86_ops' hardware_unsetup()
kernel Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
kvm KVM: x86: Fix BUILD_BUG() in __cpuid_entry_get_reg() w/ CONFIG_UBSAN=y
lib Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
math-emu Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
mm x86: mm: avoid allocating struct mm_struct on the stack
net bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS
oprofile x86: Use pr_warn instead of pr_warning
pci Merge tag 'pci-v5.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
platform Merge tag 'efi-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
power x86/asm/32: Change all ENTRY+ENDPROC to SYM_FUNC_*
purgatory Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
ras RAS/CEC: Add CONFIG_RAS_CEC_DEBUG and move CEC debug features there
realmode kbuild: rename hostprogs-y/always to hostprogs/always-y
tools kbuild: rename hostprogs-y/always to hostprogs/always-y
um um: Implement copy_thread_tls
video treewide: Add SPDX license identifier - Makefile/Kconfig
xen Merge tag 'for-linus-5.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
.gitignore x86/build: Add arch/x86/tools/insn_decoder_test to .gitignore
Kbuild treewide: Add SPDX license identifier - Kbuild
Kconfig asm-generic/tlb: rename HAVE_RCU_TABLE_FREE
Kconfig.cpu x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs
Kconfig.debug x86: mm: convert dump_pagetables to use walk_page_range
Makefile x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
Makefile.um x86, powerpc: Remove -funit-at-a-time compiler option entirely
Makefile_32.cpu x86/math-emu: Limit MATH_EMULATION to 486SX compatibles