From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
"Jim Meyering" <meyering@redhat.com>,
"Stefan Weil" <sw@weilnetz.de>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Blue Swirl" <blauwirbel@gmail.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 1.1 1/2] kvm/apic: correct short memset
Date: Mon, 11 Jun 2012 07:29:50 +0200 [thread overview]
Message-ID: <4FD5824E.1030602@siemens.com> (raw)
In-Reply-To: <4FD503A4.8000306@weilnetz.de>
On 2012-06-10 22:29, Stefan Weil wrote:
> Am 23.05.2012 12:33, schrieb Jan Kiszka:
>> On 2012-05-22 17:30, Stefan Weil wrote:
>>> Am 10.05.2012 19:28, schrieb Jan Kiszka:
>>>> On 2012-05-10 13:19, Jim Meyering wrote:
>>>>
>>>>> From: Jim Meyering<meyering@redhat.com>
>>>>>
>>>>> kvm_put_apic_state's attempt to clear *kapic before setting its
>>>>> bits cleared sizeof(void*) bytes (no more than 8) rather than the
>>>>> intended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity.
>>>>>
>>>>> Signed-off-by: Jim Meyering<meyering@redhat.com>
>>>>> ---
>>>>> hw/kvm/apic.c | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/hw/kvm/apic.c b/hw/kvm/apic.c
>>>>> index ffe7a52..a0ab503 100644
>>>>> --- a/hw/kvm/apic.c
>>>>> +++ b/hw/kvm/apic.c
>>>>> @@ -29,7 +29,7 @@ void kvm_put_apic_state(DeviceState *d, struct kvm_lapic_state *kapic)
>>>>> APICCommonState *s = DO_UPCAST(APICCommonState, busdev.qdev, d);
>>>>> int i;
>>>>>
>>>>> - memset(kapic, 0, sizeof(kapic));
>>>>> + memset(kapic, 0, sizeof(*kapic));
>>>>> kvm_apic_set_reg(kapic, 0x2, s->id<< 24);
>>>>> kvm_apic_set_reg(kapic, 0x8, s->tpr);
>>>>> kvm_apic_set_reg(kapic, 0xd, s->log_dest<< 24);
>>>>>
>>>> Yep, that's what I actually meant...
>>>>
>>>> Thanks,
>>>> Jan
>>>>
>>>>
>>>
>>> Reviewed-by: Stefan Weil<sw@weilnetz.de>
>>>
>>> Hello Anthony,
>>>
>>> this patch should be committed to QEMU 1.1.
>>> I had sent a patch with the same fix 6 days later.
>>
>> Thanks for reminding. Yes, please merge!
>>
>> Jan
>
>
> Ping?
>
> This is one of the bug fixes which is missing in QEMU 1.1,
> and it is also missing in latest QEMU git master.
>
> What can be done to get it committed?
Avi or Marcelo, please queue in uq/master and send a pull soon!
That reminds me that [1] is still awaiting comments (and further
testing). Critical for qemu-kvm 1.1 and qemu 1.1.1 as well.
Jan
[1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/92036
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2012-06-11 5:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 16:19 [Qemu-devel] [PATCH 0/2] memset/sizeof abuse Jim Meyering
2012-05-10 16:19 ` [Qemu-devel] [PATCH 1/2] kvm/apic: correct short memset Jim Meyering
2012-05-10 17:28 ` Jan Kiszka
2012-05-22 20:30 ` [Qemu-devel] [PATCH 1.1 " Stefan Weil
2012-05-23 10:33 ` Jan Kiszka
2012-06-10 20:29 ` Stefan Weil
2012-06-11 5:29 ` Jan Kiszka [this message]
2012-06-11 9:58 ` [Qemu-devel] [PATCH " Avi Kivity
2012-05-10 16:19 ` [Qemu-devel] [PATCH 2/2] cadence_gem: avoid stack-writing buffer-overrun Jim Meyering
2012-05-14 4:57 ` Peter Crosthwaite
2012-06-10 20:34 ` Stefan Weil
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=4FD5824E.1030602@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=meyering@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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).