]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/include/asm/x86_init.h
x86/virt, x86/platform: Merge 'struct x86_hyper' into 'struct x86_platform' and ...
authorJuergen Gross <jgross@suse.com>
Thu, 9 Nov 2017 13:27:35 +0000 (14:27 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Sat, 6 Jan 2018 12:23:03 +0000 (13:23 +0100)
commit2d0b017b38623bca666acbcb5ab251315845fa55
tree1b7d872f5edf58906dcf7486e9346734e0e9ddb4
parenteda363b23c1601f733cb1d7d66d1a4975c4c5d09
x86/virt, x86/platform: Merge 'struct x86_hyper' into 'struct x86_platform' and 'struct x86_init'

CVE-2017-5754

Instead of x86_hyper being either NULL on bare metal or a pointer to a
struct hypervisor_x86 in case of the kernel running as a guest merge
the struct into x86_platform and x86_init.

This will remove the need for wrappers making it hard to find out what
is being called. With dummy functions added for all callbacks testing
for a NULL function pointer can be removed, too.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: akataria@vmware.com
Cc: boris.ostrovsky@oracle.com
Cc: devel@linuxdriverproject.org
Cc: haiyangz@microsoft.com
Cc: kvm@vger.kernel.org
Cc: kys@microsoft.com
Cc: pbonzini@redhat.com
Cc: rkrcmar@redhat.com
Cc: rusty@rustcorp.com.au
Cc: sthemmin@microsoft.com
Cc: virtualization@lists.linux-foundation.org
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/20171109132739.23465-2-jgross@suse.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit f72e38e8ec8869ac0ba5a75d7d2f897d98a1454e)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
12 files changed:
arch/x86/include/asm/hypervisor.h
arch/x86/include/asm/x86_init.h
arch/x86/kernel/apic/apic.c
arch/x86/kernel/cpu/hypervisor.c
arch/x86/kernel/cpu/mshyperv.c
arch/x86/kernel/cpu/vmware.c
arch/x86/kernel/kvm.c
arch/x86/kernel/x86_init.c
arch/x86/mm/init.c
arch/x86/xen/enlighten_hvm.c
arch/x86/xen/enlighten_pv.c
include/linux/hypervisor.h