* [Qemu-devel] [PATCH] hmp: free sev info
@ 2018-03-19 17:58 Marc-André Lureau
2018-03-19 18:39 ` [Qemu-devel] [PATCH for-2.12] " Eric Blake
0 siblings, 1 reply; 4+ messages in thread
From: Marc-André Lureau @ 2018-03-19 17:58 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, pbonzini, brijesh.singh, Marc-André Lureau
Found thanks to ASAN:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7efe20417a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
#1 0x7efe1f7b2f75 in g_malloc0 ../glib/gmem.c:124
#2 0x7efe1f7b3249 in g_malloc0_n ../glib/gmem.c:355
#3 0x558272879162 in sev_get_info /home/elmarco/src/qemu/target/i386/sev.c:414
#4 0x55827285113b in hmp_info_sev /home/elmarco/src/qemu/target/i386/monitor.c:684
#5 0x5582724043b8 in handle_hmp_command /home/elmarco/src/qemu/monitor.c:3333
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
target/i386/monitor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 011419eba2..a890b3c2ab 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -696,6 +696,8 @@ void hmp_info_sev(Monitor *mon, const QDict *qdict)
} else {
monitor_printf(mon, "SEV is not enabled\n");
}
+
+ qapi_free_SevInfo(info);
}
SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp)
--
2.16.2.521.g9aa15f885a
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.12] hmp: free sev info
2018-03-19 17:58 [Qemu-devel] [PATCH] hmp: free sev info Marc-André Lureau
@ 2018-03-19 18:39 ` Eric Blake
2018-03-19 19:33 ` Dr. David Alan Gilbert
2018-03-20 11:08 ` Dr. David Alan Gilbert
0 siblings, 2 replies; 4+ messages in thread
From: Eric Blake @ 2018-03-19 18:39 UTC (permalink / raw)
To: Marc-André Lureau, qemu-devel; +Cc: pbonzini, brijesh.singh, dgilbert
On 03/19/2018 12:58 PM, Marc-André Lureau wrote:
> Found thanks to ASAN:
>
> Direct leak of 16 byte(s) in 1 object(s) allocated from:
> #0 0x7efe20417a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
> #1 0x7efe1f7b2f75 in g_malloc0 ../glib/gmem.c:124
> #2 0x7efe1f7b3249 in g_malloc0_n ../glib/gmem.c:355
> #3 0x558272879162 in sev_get_info /home/elmarco/src/qemu/target/i386/sev.c:414
> #4 0x55827285113b in hmp_info_sev /home/elmarco/src/qemu/target/i386/monitor.c:684
> #5 0x5582724043b8 in handle_hmp_command /home/elmarco/src/qemu/monitor.c:3333
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> target/i386/monitor.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
Worth mentioning in the commit message that this was introduced in
commit 63036314.
And safe for freeze, as it's fixing a memory usage bug in material new
to the 2.12 release.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.12] hmp: free sev info
2018-03-19 18:39 ` [Qemu-devel] [PATCH for-2.12] " Eric Blake
@ 2018-03-19 19:33 ` Dr. David Alan Gilbert
2018-03-20 11:08 ` Dr. David Alan Gilbert
1 sibling, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2018-03-19 19:33 UTC (permalink / raw)
To: Eric Blake; +Cc: Marc-André Lureau, qemu-devel, pbonzini, brijesh.singh
* Eric Blake (eblake@redhat.com) wrote:
> On 03/19/2018 12:58 PM, Marc-André Lureau wrote:
> > Found thanks to ASAN:
> >
> > Direct leak of 16 byte(s) in 1 object(s) allocated from:
> > #0 0x7efe20417a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
> > #1 0x7efe1f7b2f75 in g_malloc0 ../glib/gmem.c:124
> > #2 0x7efe1f7b3249 in g_malloc0_n ../glib/gmem.c:355
> > #3 0x558272879162 in sev_get_info /home/elmarco/src/qemu/target/i386/sev.c:414
> > #4 0x55827285113b in hmp_info_sev /home/elmarco/src/qemu/target/i386/monitor.c:684
> > #5 0x5582724043b8 in handle_hmp_command /home/elmarco/src/qemu/monitor.c:3333
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > target/i386/monitor.c | 2 ++
> > 1 file changed, 2 insertions(+)
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> Worth mentioning in the commit message that this was introduced in commit
> 63036314.
>
> And safe for freeze, as it's fixing a memory usage bug in material new to
> the 2.12 release.
Thanks, I'll pick that up for HMP.
Dave
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.12] hmp: free sev info
2018-03-19 18:39 ` [Qemu-devel] [PATCH for-2.12] " Eric Blake
2018-03-19 19:33 ` Dr. David Alan Gilbert
@ 2018-03-20 11:08 ` Dr. David Alan Gilbert
1 sibling, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2018-03-20 11:08 UTC (permalink / raw)
To: Eric Blake; +Cc: Marc-André Lureau, qemu-devel, pbonzini, brijesh.singh
* Eric Blake (eblake@redhat.com) wrote:
> On 03/19/2018 12:58 PM, Marc-André Lureau wrote:
> > Found thanks to ASAN:
> >
> > Direct leak of 16 byte(s) in 1 object(s) allocated from:
> > #0 0x7efe20417a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
> > #1 0x7efe1f7b2f75 in g_malloc0 ../glib/gmem.c:124
> > #2 0x7efe1f7b3249 in g_malloc0_n ../glib/gmem.c:355
> > #3 0x558272879162 in sev_get_info /home/elmarco/src/qemu/target/i386/sev.c:414
> > #4 0x55827285113b in hmp_info_sev /home/elmarco/src/qemu/target/i386/monitor.c:684
> > #5 0x5582724043b8 in handle_hmp_command /home/elmarco/src/qemu/monitor.c:3333
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > target/i386/monitor.c | 2 ++
> > 1 file changed, 2 insertions(+)
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> Worth mentioning in the commit message that this was introduced in commit
> 63036314.
Queued. I've added:
Fixes: 63036314
to the commit message.
Dave
> And safe for freeze, as it's fixing a memory usage bug in material new to
> the 2.12 release.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-20 11:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-19 17:58 [Qemu-devel] [PATCH] hmp: free sev info Marc-André Lureau
2018-03-19 18:39 ` [Qemu-devel] [PATCH for-2.12] " Eric Blake
2018-03-19 19:33 ` Dr. David Alan Gilbert
2018-03-20 11:08 ` Dr. David Alan Gilbert
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).