From: Christoffer Dall <cdall@linaro.org>
To: Andrew Jones <drjones@redhat.com>
Cc: marc.zyngier@arm.com, lkurusa@redhat.com, kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH] KVM: arm/arm64: fix races in kvm_psci_vcpu_on
Date: Wed, 19 Apr 2017 12:25:19 +0200 [thread overview]
Message-ID: <20170419102519.GC4104@cbox> (raw)
In-Reply-To: <20170418155958.13406-2-drjones@redhat.com>
On Tue, Apr 18, 2017 at 05:59:58PM +0200, Andrew Jones wrote:
> Fix potential races in kvm_psci_vcpu_on() by taking the kvm->lock
> mutex. In general, it's a bad idea to allow more than one PSCI_CPU_ON
> to process the same target VCPU at the same time. One such problem
> that may arise is that one PSCI_CPU_ON could be resetting the target
> vcpu, which fills the entire sys_regs array with a temporary value
> including the MPIDR register, while another looks up the VCPU based
> on the MPIDR value, resulting in no target VCPU found. Resolves both
> races found with the kvm-unit-tests/arm/psci unit test.
>
> Reported-by: Levente Kurusa <lkurusa@redhat.com>
> Suggested-by: Christoffer Dall <cdall@linaro.org>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Applied to kvmarm/queue.
Thanks,
-Christoffer
prev parent reply other threads:[~2017-04-19 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 15:59 [PATCH] KVM: arm/arm64: fix races in psci emulation Andrew Jones
2017-04-18 15:59 ` [PATCH] KVM: arm/arm64: fix races in kvm_psci_vcpu_on Andrew Jones
2017-04-19 7:56 ` Marc Zyngier
2017-04-19 10:25 ` Christoffer Dall [this message]
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=20170419102519.GC4104@cbox \
--to=cdall@linaro.org \
--cc=drjones@redhat.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=lkurusa@redhat.com \
--cc=marc.zyngier@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.