stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: jinpu.wang@profitbricks.com, david@redhat.com,
	gregkh@linuxfoundation.org, pbonzini@redhat.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "KVM: nVMX: kmap() can't fail" has been added to the 4.4-stable tree
Date: Fri, 23 Feb 2018 17:37:41 +0100	[thread overview]
Message-ID: <151940386178161@kroah.com> (raw)
In-Reply-To: <1519382538-15143-26-git-send-email-jinpu.wangl@profitbricks.com>


This is a note to let you know that I've just added the patch titled

    KVM: nVMX: kmap() can't fail

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-nvmx-kmap-can-t-fail.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Fri Feb 23 17:23:58 CET 2018
From: Jack Wang <jinpu.wang@profitbricks.com>
Date: Fri, 23 Feb 2018 11:42:14 +0100
Subject: KVM: nVMX: kmap() can't fail
To: gregkh@linuxfoundation.org, stable@vger.kernel.org
Cc: David Hildenbrand <david@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Jack Wang <jinpu.wang@profitbricks.com>
Message-ID: <1519382538-15143-26-git-send-email-jinpu.wangl@profitbricks.com>

From: David Hildenbrand <david@redhat.com>

commit 42cf014d38d8822cce63703a467e00f65d000952 upstream.

kmap() can't fail, therefore it will always return a valid pointer. Let's
just get rid of the unnecessary checks.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/kvm/vmx.c |    9 ---------
 1 file changed, 9 deletions(-)

--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4532,10 +4532,6 @@ static int vmx_complete_nested_posted_in
 			return 0;
 
 		vapic_page = kmap(vmx->nested.virtual_apic_page);
-		if (!vapic_page) {
-			WARN_ON(1);
-			return -ENOMEM;
-		}
 		__kvm_apic_update_irr(vmx->nested.pi_desc->pir, vapic_page);
 		kunmap(vmx->nested.virtual_apic_page);
 
@@ -9238,11 +9234,6 @@ static inline bool nested_vmx_merge_msr_
 		return false;
 	}
 	msr_bitmap = (unsigned long *)kmap(page);
-	if (!msr_bitmap) {
-		nested_release_page_clean(page);
-		WARN_ON(1);
-		return false;
-	}
 
 	if (nested_cpu_has_virt_x2apic_mode(vmcs12)) {
 		if (nested_cpu_has_apic_reg_virt(vmcs12))


Patches currently in stable-queue which might be from jinpu.wang@profitbricks.com are

queue-4.4/x86-paravirt-remove-noreplace-paravirt-cmdline-option.patch
queue-4.4/documentation-document-array_index_nospec.patch
queue-4.4/kvm-x86-make-indirect-calls-in-emulator-speculation-safe.patch
queue-4.4/x86-nospec-fix-header-guards-names.patch
queue-4.4/x86-retpoline-avoid-retpolines-for-built-in-__init-functions.patch
queue-4.4/vfs-fdtable-prevent-bounds-check-bypass-via-speculative-execution.patch
queue-4.4/kvm-nvmx-invvpid-handling-improvements.patch
queue-4.4/x86-cpu-bugs-make-retpoline-module-warning-conditional.patch
queue-4.4/x86-spectre-check-config_retpoline-in-command-line-parser.patch
queue-4.4/x86-implement-array_index_mask_nospec.patch
queue-4.4/array_index_nospec-sanitize-speculative-array-de-references.patch
queue-4.4/kvm-vmx-make-indirect-call-speculation-safe.patch
queue-4.4/x86-spectre-fix-spelling-mistake-vunerable-vulnerable.patch
queue-4.4/kvm-nvmx-fix-kernel-panics-induced-by-illegal-invept-invvpid-types.patch
queue-4.4/module-retpoline-warn-about-missing-retpoline-in-module.patch
queue-4.4/x86-kvm-update-spectre-v1-mitigation.patch
queue-4.4/x86-get_user-use-pointer-masking-to-limit-speculation.patch
queue-4.4/x86-syscall-sanitize-syscall-table-de-references-under-speculation.patch
queue-4.4/kvm-nvmx-vmx_complete_nested_posted_interrupt-can-t-fail.patch
queue-4.4/x86-spectre-simplify-spectre_v2-command-line-parsing.patch
queue-4.4/x86-speculation-fix-typo-ibrs_att-which-should-be-ibrs_all.patch
queue-4.4/x86-spectre-report-get_user-mitigation-for-spectre_v1.patch
queue-4.4/x86-introduce-barrier_nospec.patch
queue-4.4/kvm-async_pf-fix-df-due-to-inject-page-not-present-and-page-ready-exceptions-simultaneously.patch
queue-4.4/kvm-vmx-clean-up-declaration-of-vpid-ept-invalidation-types.patch
queue-4.4/x86-bugs-drop-one-mitigation-from-dmesg.patch
queue-4.4/x86-retpoline-remove-the-esp-rsp-thunk.patch
queue-4.4/nl80211-sanitize-array-index-in-parse_txq_params.patch
queue-4.4/kvm-nvmx-kmap-can-t-fail.patch

  reply	other threads:[~2018-02-23 16:39 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 10:41 [stable 4.4 00/29] some stable-4.4 backport Jack Wang
2018-02-23 10:41 ` [stable 4.4 01/29] KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously Jack Wang
2018-02-23 10:41 ` [stable 4.4 02/29] x86/retpoline: Remove the esp/rsp thunk Jack Wang
2018-02-23 16:39   ` Patch "x86/retpoline: Remove the esp/rsp thunk" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 03/29] KVM: x86: Make indirect calls in emulator speculation safe Jack Wang
2018-02-23 16:37   ` Patch "KVM: x86: Make indirect calls in emulator speculation safe" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 04/29] KVM: VMX: Make indirect call speculation safe Jack Wang
2018-02-23 16:37   ` Patch "KVM: VMX: Make indirect call speculation safe" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 05/29] module/retpoline: Warn about missing retpoline in module Jack Wang
2018-02-23 16:37   ` Patch "module/retpoline: Warn about missing retpoline in module" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 06/29] x86/nospec: Fix header guards names Jack Wang
2018-02-23 16:39   ` Patch "x86/nospec: Fix header guards names" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 07/29] x86/bugs: Drop one "mitigation" from dmesg Jack Wang
2018-02-23 16:39   ` Patch "x86/bugs: Drop one "mitigation" from dmesg" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 08/29] x86/cpu/bugs: Make retpoline module warning conditional Jack Wang
2018-02-23 16:39   ` Patch "x86/cpu/bugs: Make retpoline module warning conditional" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 09/29] x86/spectre: Check CONFIG_RETPOLINE in command line parser Jack Wang
2018-02-23 16:39   ` Patch "x86/spectre: Check CONFIG_RETPOLINE in command line parser" has been added to the 4.4-stable tree gregkh
2018-02-23 10:41 ` [stable 4.4 10/29] Documentation: Document array_index_nospec Jack Wang
2018-02-23 16:36   ` Patch "Documentation: Document array_index_nospec" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 11/29] array_index_nospec: Sanitize speculative array de-references Jack Wang
2018-02-23 16:36   ` Patch "array_index_nospec: Sanitize speculative array de-references" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 12/29] x86: Implement array_index_mask_nospec Jack Wang
2018-02-23 16:39   ` Patch "x86: Implement array_index_mask_nospec" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 13/29] x86: Introduce barrier_nospec Jack Wang
2018-02-23 16:39   ` Patch "x86: Introduce barrier_nospec" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 14/29] x86/get_user: Use pointer masking to limit speculation Jack Wang
2018-02-23 16:39   ` Patch "x86/get_user: Use pointer masking to limit speculation" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 15/29] x86/syscall: Sanitize syscall table de-references under speculation Jack Wang
2018-02-23 16:39   ` Patch "x86/syscall: Sanitize syscall table de-references under speculation" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 16/29] vfs, fdtable: Prevent bounds-check bypass via speculative execution Jack Wang
2018-02-23 16:38   ` Patch "vfs, fdtable: Prevent bounds-check bypass via speculative execution" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 17/29] nl80211: Sanitize array index in parse_txq_params Jack Wang
2018-02-23 16:38   ` Patch "nl80211: Sanitize array index in parse_txq_params" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 18/29] x86/spectre: Report get_user mitigation for spectre_v1 Jack Wang
2018-02-23 16:39   ` Patch "x86/spectre: Report get_user mitigation for spectre_v1" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 19/29] x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable" Jack Wang
2018-02-23 16:39   ` Patch "x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable"" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 20/29] x86/paravirt: Remove 'noreplace-paravirt' cmdline option Jack Wang
2018-02-23 16:39   ` Patch "x86/paravirt: Remove 'noreplace-paravirt' cmdline option" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 21/29] x86/kvm: Update spectre-v1 mitigation Jack Wang
2018-02-23 16:39   ` Patch "x86/kvm: Update spectre-v1 mitigation" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 22/29] x86/retpoline: Avoid retpolines for built-in __init functions Jack Wang
2018-02-23 16:39   ` Patch "x86/retpoline: Avoid retpolines for built-in __init functions" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 23/29] x86/spectre: Simplify spectre_v2 command line parsing Jack Wang
2018-02-23 16:39   ` Patch "x86/spectre: Simplify spectre_v2 command line parsing" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 24/29] x86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL Jack Wang
2018-02-23 16:39   ` Patch "x86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 25/29] KVM: nVMX: kmap() can't fail Jack Wang
2018-02-23 16:37   ` gregkh [this message]
2018-02-23 10:42 ` [stable 4.4 26/29] KVM: nVMX: vmx_complete_nested_posted_interrupt() " Jack Wang
2018-02-23 16:37   ` Patch "KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail" has been added to the 4.4-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 27/29] kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types Jack Wang
2018-02-23 10:42 ` [stable 4.4 28/29] KVM: VMX: clean up declaration of VPID/EPT invalidation types Jack Wang
2018-02-23 10:54   ` Greg KH
2018-02-23 11:03     ` Jinpu Wang
2018-02-23 16:37   ` Patch "KVM: VMX: clean up declaration of VPID/EPT invalidation types" has been added to the 4.4-stable tree gregkh
2018-02-23 16:39   ` Patch "KVM: VMX: clean up declaration of VPID/EPT invalidation types" has been added to the 4.9-stable tree gregkh
2018-02-23 10:42 ` [stable 4.4 29/29] KVM: nVMX: invvpid handling improvements Jack Wang
2018-02-23 16:37   ` Patch "KVM: nVMX: invvpid handling improvements" has been added to the 4.4-stable tree gregkh
2018-02-23 16:39   ` Patch "KVM: nVMX: invvpid handling improvements" has been added to the 4.9-stable tree gregkh
2018-02-23 10:53 ` [stable 4.4 00/29] some stable-4.4 backport Greg KH
2018-02-23 11:07   ` Jinpu Wang
2018-02-23 16:19     ` Greg KH
2018-02-23 16:36 ` Greg KH
2018-02-26  8:29   ` Jinpu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=151940386178161@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=david@redhat.com \
    --cc=jinpu.wang@profitbricks.com \
    --cc=pbonzini@redhat.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).