From: Greg Kroah-Hartman Date: Tue, 18 Apr 2017 14:25:42 +0000 (+0200) Subject: 3.18-stable patches X-Git-Tag: v4.4.63~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4eaa32ff1ffb89577c7ddc137655998332763a89;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: kvm-fix-page-struct-leak-in-handle_vmon.patch revert-arm-8457-1-psci-smp-is-built-only-for-smp.patch --- diff --git a/queue-3.18/kvm-fix-page-struct-leak-in-handle_vmon.patch b/queue-3.18/kvm-fix-page-struct-leak-in-handle_vmon.patch new file mode 100644 index 00000000000..5c731554154 --- /dev/null +++ b/queue-3.18/kvm-fix-page-struct-leak-in-handle_vmon.patch @@ -0,0 +1,48 @@ +From 06ce521af9558814b8606c0476c54497cf83a653 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 24 Jan 2017 11:56:21 +0100 +Subject: kvm: fix page struct leak in handle_vmon + +From: Paolo Bonzini + +commit 06ce521af9558814b8606c0476c54497cf83a653 upstream. + +handle_vmon gets a reference on VMXON region page, +but does not release it. Release the reference. + +Found by syzkaller; based on a patch by Dmitry. + +Reported-by: Dmitry Vyukov +Signed-off-by: Paolo Bonzini +[bwh: Backported to 3.16: use skip_emulated_instruction()] +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/vmx.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/arch/x86/kvm/vmx.c ++++ b/arch/x86/kvm/vmx.c +@@ -6079,14 +6079,20 @@ static int nested_vmx_check_vmptr(struct + } + + page = nested_get_page(vcpu, vmptr); +- if (page == NULL || +- *(u32 *)kmap(page) != VMCS12_REVISION) { ++ if (page == NULL) { + nested_vmx_failInvalid(vcpu); ++ skip_emulated_instruction(vcpu); ++ return 1; ++ } ++ if (*(u32 *)kmap(page) != VMCS12_REVISION) { + kunmap(page); ++ nested_release_page_clean(page); ++ nested_vmx_failInvalid(vcpu); + skip_emulated_instruction(vcpu); + return 1; + } + kunmap(page); ++ nested_release_page_clean(page); + vmx->nested.vmxon_ptr = vmptr; + break; + case EXIT_REASON_VMCLEAR: diff --git a/queue-3.18/revert-arm-8457-1-psci-smp-is-built-only-for-smp.patch b/queue-3.18/revert-arm-8457-1-psci-smp-is-built-only-for-smp.patch new file mode 100644 index 00000000000..243d1cc402a --- /dev/null +++ b/queue-3.18/revert-arm-8457-1-psci-smp-is-built-only-for-smp.patch @@ -0,0 +1,39 @@ +From amit.pundir@linaro.org Tue Apr 18 16:20:49 2017 +From: Amit Pundir +Date: Thu, 6 Apr 2017 11:37:14 +0530 +Subject: Revert "ARM: 8457/1: psci-smp is built only for SMP" +To: stable@vger.kernel.org +Cc: gregkh@linuxfoundation.org +Message-ID: <1491458834-28498-1-git-send-email-amit.pundir@linaro.org> + +From: Amit Pundir + +This reverts commit dbcfee724255ae171af51aaa56d8c5b78342adc9 which is +commit be95485a0b8288a93402705730d3ea32f9f812b9 upstream. + +Upstream commit be95485 (ARM: 8457/1: psci-smp is built only for SMP) +was intended to fix the build error for configs with CONFIG_SMP=n and +CONFIG_ARM_PSCI=y, but it end up introducing a build error when +cherry-picked on 3.18.y. + +This patch resulted in redefinition of psci_init() and broke the +build for every build config in 3.18.y with CONFIG_SMP=n and +CONFIG_ARM_PSCI=y. + +Signed-off-by: Amit Pundir +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/include/asm/psci.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/include/asm/psci.h ++++ b/arch/arm/include/asm/psci.h +@@ -37,7 +37,7 @@ struct psci_operations { + extern struct psci_operations psci_ops; + extern struct smp_operations psci_smp_ops; + +-#if defined(CONFIG_SMP) && defined(CONFIG_ARM_PSCI) ++#ifdef CONFIG_ARM_PSCI + int psci_init(void); + bool psci_smp_available(void); + #else diff --git a/queue-3.18/series b/queue-3.18/series index 2fe274b82fe..88dd3e349ba 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -12,3 +12,5 @@ xen-fbfront-fix-connecting-to-backend.patch ftrace-fix-removing-of-second-function-probe.patch char-drop-bogus-dependency-of-devport-on-m68k.patch char-lack-of-bool-string-made-config_devport-always-on.patch +revert-arm-8457-1-psci-smp-is-built-only-for-smp.patch +kvm-fix-page-struct-leak-in-handle_vmon.patch