From: Pavel Fedin <p.fedin@samsung.com>
To: 'Andrew Jones' <drjones@redhat.com>
Cc: 'Marc Zyngier' <marc.zyngier@arm.com>,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: RE: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers
Date: Mon, 07 Dec 2015 11:36:28 +0300 [thread overview]
Message-ID: <011601d130ca$64cc9070$2e65b150$@samsung.com> (raw)
In-Reply-To: <20151205003334.GB3117@hawk.localdomain>
Hello!
> FYI, I tried writing test cases for this issue with kvm-unit-tests. The
> issue didn't reproduce for me. It's quite possible my test cases are
> flawed, so I'm not making any claims about the validity of the series
This is indeed very interesting, so i'll take a look at it.
For now i've just only took a quick glance at the code, and i have at least one suggestion. Could you happen to have sp == 0 in
check_xzr_sysreg()? In this case it will magically work.
Also, you could try to write a test which tries to overwrite xzr. Something like:
volatile int *addr1;
volatile int *addr2;
asm volatile("str %3, [%1]\n\t"
"ldr wzr, [%1]\n\t"
"str wzr, [%2]\n\t",
"ldr %0, [%2]\n\t"
:"=r"(res):"r"(addr1), "r"(addr2), "r"(some_nonzero_val):"memory");
Then check for res == some_nonzero_val. If they are equal, you've got the bug :)
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
next prev parent reply other threads:[~2015-12-07 8:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 12:03 [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers Pavel Fedin
2015-12-04 12:03 ` [PATCH v4 1/4] KVM: arm64: Correctly handle zero register during MMIO Pavel Fedin
2015-12-04 15:33 ` Marc Zyngier
2015-12-04 12:03 ` [PATCH v4 2/4] KVM: arm64: Remove const from struct sys_reg_params Pavel Fedin
2015-12-04 13:00 ` Marc Zyngier
2015-12-04 12:03 ` [PATCH v4 3/4] KVM: arm64: Correctly handle zero register in system register accesses Pavel Fedin
2015-12-04 12:03 ` [PATCH v4 4/4] KVM: arm64: Get rid of old vcpu_reg() Pavel Fedin
2015-12-05 0:33 ` [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers Andrew Jones
2015-12-07 8:36 ` Pavel Fedin [this message]
2015-12-07 22:36 ` Andrew Jones
2015-12-07 23:45 ` Andrew Jones
2015-12-08 6:57 ` Pavel Fedin
2015-12-08 14:48 ` Andrew Jones
2015-12-07 8:47 ` Pavel Fedin
2015-12-07 21:50 ` Andrew Jones
2015-12-07 9:48 ` Pavel Fedin
2015-12-07 21:58 ` Andrew Jones
2015-12-07 22:25 ` Andrew Jones
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='011601d130ca$64cc9070$2e65b150$@samsung.com' \
--to=p.fedin@samsung.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--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.