All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Pavel Fedin <p.fedin@samsung.com>,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: Re: [PATCH v2 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers
Date: Fri, 04 Dec 2015 11:28:08 +0000	[thread overview]
Message-ID: <566178C8.1070608@arm.com> (raw)
In-Reply-To: <cover.1449224338.git.p.fedin@samsung.com>

On 04/12/15 10:25, Pavel Fedin wrote:
> ARM64 CPU has zero register which is read-only, with a value of 0.
> However, KVM currently incorrectly recognizes it being SP (because
> Rt == 31, and in struct user_pt_regs 'regs' array is followed by SP),
> resulting in invalid value being read, or even SP corruption on write.
> 
> The problem has been discovered by performing an operation
> 
>  *((volatile int *)reg) = 0;
> 
> which compiles as "str xzr, [xx]", and resulted in strange values being
> written.
> 
> v1 => v2:
> - Changed type of transfer value to u64 and store it directly in
>   struct sys_reg_params instead of a pointer
> - Use lower_32_bits()/upper_32_bits() where appropriate
> - Fixed wrong usage of 'Rt' instead of 'Rt2' in kvm_handle_cp_64(),
>   overlooked in v1
> - Do not write value back when reading

[+Christoffer]

Hi Pavel,

Thanks a lot for respining this quickly. I just had a few minor
comments, so this is almost ready to go. If you can fix that (and
assuming nobody has any further objection), we'll try to get this queued
ASAP.

Cheers,

	M.
-- 
Jazz is not dead. It just smells funny...

  parent reply	other threads:[~2015-12-04 11:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 10:25 [PATCH v2 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers Pavel Fedin
2015-12-04 10:25 ` [PATCH v2 1/4] KVM: arm64: Correctly handle zero register during MMIO Pavel Fedin
2015-12-04 10:25 ` [PATCH v2 2/4] KVM: arm64: Remove const from struct sys_reg_params Pavel Fedin
2015-12-04 11:15   ` Marc Zyngier
2015-12-04 11:29     ` Pavel Fedin
2015-12-04 10:25 ` [PATCH v2 3/4] KVM: arm64: Correctly handle zero register in system register accesses Pavel Fedin
2015-12-04 11:21   ` Marc Zyngier
2015-12-04 10:26 ` [PATCH v2 4/4] KVM: arm64: Get rid of old vcpu_reg() Pavel Fedin
2015-12-04 11:23   ` Marc Zyngier
2015-12-04 11:28 ` Marc Zyngier [this message]
2015-12-04 11:58   ` [PATCH v2 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers Pavel Fedin

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=566178C8.1070608@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=p.fedin@samsung.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.