From: Paolo Bonzini <pbonzini@redhat.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
Wanpeng Li <kernellwp@gmail.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
"Wanpeng Li" <wanpeng.li@hotmail.com>,
"Christoffer Dall" <christoffer.dall@linaro.org>
Subject: Re: [PATCH v4] KVM: Fix stack-out-of-bounds read in write_mmio
Date: Mon, 18 Dec 2017 12:55:05 +0100 [thread overview]
Message-ID: <17d27b8d-908b-a740-1d2d-e92a8507f25b@redhat.com> (raw)
In-Reply-To: <15b7b9e5-5b11-f20f-0260-5c8b9fc5e111@arm.com>
On 15/12/2017 12:06, Marc Zyngier wrote:
> Assuming you address the above:
>
> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
> Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Done as follows:
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index dfd21708694f..0a016bd14c2d 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -227,7 +227,8 @@
__entry->gpa = gpa;
__entry->val = 0;
if (val)
- memcpy(&__entry->val, val, min(8, len));
+ memcpy(&__entry->val, val,
+ min_t(u32, sizeof(__entry->val), len));
),
TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx",
Thanks,
Paolo
next prev parent reply other threads:[~2017-12-18 11:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 1:40 Wanpeng Li
2017-12-15 9:52 ` Darren Kenny
2017-12-15 11:06 ` Marc Zyngier
2017-12-17 2:10 ` Wanpeng Li
2017-12-18 11:55 ` Paolo Bonzini [this message]
2017-12-18 12:06 ` Marc Zyngier
2017-12-18 12:09 ` Wanpeng Li
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=17d27b8d-908b-a740-1d2d-e92a8507f25b@redhat.com \
--to=pbonzini@redhat.com \
--cc=christoffer.dall@linaro.org \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=rkrcmar@redhat.com \
--cc=wanpeng.li@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®