* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-11 13:26 [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory Cornelia Huck
@ 2017-09-11 13:45 ` Laurent Vivier
2017-09-11 14:02 ` Greg Kurz
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Laurent Vivier @ 2017-09-11 13:45 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel; +Cc: berrange, peterx, dgilbert
On 11/09/2017 15:26, Cornelia Huck wrote:
> It does not really make sense to dump memory that is not there.
>
> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> with no filter for a machine with no memory defined.
>
> New behaviour is:
>
> (qemu) dump-guest-memory /dev/null
> dump: no guest memory to dump
> (qemu) dump-guest-memory /dev/null 0 4096
> dump: no guest memory to dump
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>
> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
>
> ---
> dump.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/dump.c b/dump.c
> index a79773d0f7..d2093e141b 100644
> --- a/dump.c
> +++ b/dump.c
> @@ -1536,6 +1536,12 @@ static void dump_init(DumpState *s, int fd, bool has_format,
> fprintf(stderr, "DUMP: total memory to dump: %lu\n", s->total_size);
> #endif
>
> + /* it does not make sense to dump non-existent memory */
> + if (!s->total_size) {
> + error_setg(errp, "dump: no guest memory to dump");
> + goto cleanup;
> + }
> +
> s->start = get_start_block(s);
> if (s->start == -1) {
> error_setg(errp, QERR_INVALID_PARAMETER, "begin");
>
We need to update test-hmp, as with this change dump-guest-memory will
do nothing with none machine, as by default memory size is 0 MB (I'm
working on that)
Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-11 13:26 [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory Cornelia Huck
2017-09-11 13:45 ` Laurent Vivier
@ 2017-09-11 14:02 ` Greg Kurz
2017-09-12 2:29 ` Peter Xu
2017-09-12 3:33 ` Peter Xu
3 siblings, 0 replies; 9+ messages in thread
From: Greg Kurz @ 2017-09-11 14:02 UTC (permalink / raw)
To: Cornelia Huck; +Cc: qemu-devel, lvivier, dgilbert, peterx
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
On Mon, 11 Sep 2017 15:26:27 +0200
Cornelia Huck <cohuck@redhat.com> wrote:
> It does not really make sense to dump memory that is not there.
>
> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> with no filter for a machine with no memory defined.
>
> New behaviour is:
>
> (qemu) dump-guest-memory /dev/null
> dump: no guest memory to dump
> (qemu) dump-guest-memory /dev/null 0 4096
> dump: no guest memory to dump
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
> ---
>
> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
>
> ---
> dump.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/dump.c b/dump.c
> index a79773d0f7..d2093e141b 100644
> --- a/dump.c
> +++ b/dump.c
> @@ -1536,6 +1536,12 @@ static void dump_init(DumpState *s, int fd, bool has_format,
> fprintf(stderr, "DUMP: total memory to dump: %lu\n", s->total_size);
> #endif
>
> + /* it does not make sense to dump non-existent memory */
> + if (!s->total_size) {
> + error_setg(errp, "dump: no guest memory to dump");
> + goto cleanup;
> + }
> +
> s->start = get_start_block(s);
> if (s->start == -1) {
> error_setg(errp, QERR_INVALID_PARAMETER, "begin");
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-11 13:26 [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory Cornelia Huck
2017-09-11 13:45 ` Laurent Vivier
2017-09-11 14:02 ` Greg Kurz
@ 2017-09-12 2:29 ` Peter Xu
2017-09-12 3:33 ` Peter Xu
3 siblings, 0 replies; 9+ messages in thread
From: Peter Xu @ 2017-09-12 2:29 UTC (permalink / raw)
To: Cornelia Huck; +Cc: qemu-devel, lvivier, berrange, dgilbert
On Mon, Sep 11, 2017 at 03:26:27PM +0200, Cornelia Huck wrote:
> It does not really make sense to dump memory that is not there.
>
> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> with no filter for a machine with no memory defined.
>
> New behaviour is:
>
> (qemu) dump-guest-memory /dev/null
> dump: no guest memory to dump
> (qemu) dump-guest-memory /dev/null 0 4096
> dump: no guest memory to dump
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
>
> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
>
> ---
> dump.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/dump.c b/dump.c
> index a79773d0f7..d2093e141b 100644
> --- a/dump.c
> +++ b/dump.c
> @@ -1536,6 +1536,12 @@ static void dump_init(DumpState *s, int fd, bool has_format,
> fprintf(stderr, "DUMP: total memory to dump: %lu\n", s->total_size);
> #endif
>
> + /* it does not make sense to dump non-existent memory */
> + if (!s->total_size) {
> + error_setg(errp, "dump: no guest memory to dump");
> + goto cleanup;
> + }
> +
> s->start = get_start_block(s);
> if (s->start == -1) {
> error_setg(errp, QERR_INVALID_PARAMETER, "begin");
> --
> 2.13.5
>
--
Peter Xu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-11 13:26 [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory Cornelia Huck
` (2 preceding siblings ...)
2017-09-12 2:29 ` Peter Xu
@ 2017-09-12 3:33 ` Peter Xu
2017-09-12 10:17 ` Marc-André Lureau
3 siblings, 1 reply; 9+ messages in thread
From: Peter Xu @ 2017-09-12 3:33 UTC (permalink / raw)
To: Cornelia Huck; +Cc: qemu-devel, lvivier, berrange, dgilbert
On Mon, Sep 11, 2017 at 03:26:27PM +0200, Cornelia Huck wrote:
> It does not really make sense to dump memory that is not there.
>
> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> with no filter for a machine with no memory defined.
>
> New behaviour is:
>
> (qemu) dump-guest-memory /dev/null
> dump: no guest memory to dump
> (qemu) dump-guest-memory /dev/null 0 4096
> dump: no guest memory to dump
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>
> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
I thought Marc-André had proposed to be the maintainer? But indeed I
didn't see the line in maintainer file.
Anyway, if anyone think I am ok to maintain this single file
(considering that I haven't posted patches on it for 2 years, and I
haven't been working on any kind of maintainer job), please let me
know. I'm glad to start with it (or with Marc-André).
Thanks,
--
Peter Xu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-12 3:33 ` Peter Xu
@ 2017-09-12 10:17 ` Marc-André Lureau
2017-09-13 6:12 ` Peter Xu
2017-09-13 7:58 ` Cornelia Huck
0 siblings, 2 replies; 9+ messages in thread
From: Marc-André Lureau @ 2017-09-12 10:17 UTC (permalink / raw)
To: Peter Xu; +Cc: Cornelia Huck, Laurent Vivier, QEMU, Dr. David Alan Gilbert
Hi Peter
On Tue, Sep 12, 2017 at 5:33 AM, Peter Xu <peterx@redhat.com> wrote:
> On Mon, Sep 11, 2017 at 03:26:27PM +0200, Cornelia Huck wrote:
>> It does not really make sense to dump memory that is not there.
>>
>> Moreover, that fixes a segmentation fault when calling dump-guest-memory
>> with no filter for a machine with no memory defined.
>>
>> New behaviour is:
>>
>> (qemu) dump-guest-memory /dev/null
>> dump: no guest memory to dump
>> (qemu) dump-guest-memory /dev/null 0 4096
>> dump: no guest memory to dump
>>
>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
>> ---
>>
>> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
>
> I thought Marc-André had proposed to be the maintainer? But indeed I
> didn't see the line in maintainer file.
>
> Anyway, if anyone think I am ok to maintain this single file
> (considering that I haven't posted patches on it for 2 years, and I
> haven't been working on any kind of maintainer job), please let me
> know. I'm glad to start with it (or with Marc-André).
>
That would be great!
thanks
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-12 10:17 ` Marc-André Lureau
@ 2017-09-13 6:12 ` Peter Xu
2017-09-13 7:58 ` Cornelia Huck
1 sibling, 0 replies; 9+ messages in thread
From: Peter Xu @ 2017-09-13 6:12 UTC (permalink / raw)
To: Marc-André Lureau
Cc: Cornelia Huck, Laurent Vivier, QEMU, Dr. David Alan Gilbert
On Tue, Sep 12, 2017 at 12:17:51PM +0200, Marc-André Lureau wrote:
> Hi Peter
>
> On Tue, Sep 12, 2017 at 5:33 AM, Peter Xu <peterx@redhat.com> wrote:
> > On Mon, Sep 11, 2017 at 03:26:27PM +0200, Cornelia Huck wrote:
> >> It does not really make sense to dump memory that is not there.
> >>
> >> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> >> with no filter for a machine with no memory defined.
> >>
> >> New behaviour is:
> >>
> >> (qemu) dump-guest-memory /dev/null
> >> dump: no guest memory to dump
> >> (qemu) dump-guest-memory /dev/null 0 4096
> >> dump: no guest memory to dump
> >>
> >> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> >> ---
> >>
> >> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
> >
> > I thought Marc-André had proposed to be the maintainer? But indeed I
> > didn't see the line in maintainer file.
> >
> > Anyway, if anyone think I am ok to maintain this single file
> > (considering that I haven't posted patches on it for 2 years, and I
> > haven't been working on any kind of maintainer job), please let me
> > know. I'm glad to start with it (or with Marc-André).
> >
>
> That would be great!
> thanks
Let me try to draft a maintainer file change for this, to see whether
there are objections. Thanks!
--
Peter Xu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-12 10:17 ` Marc-André Lureau
2017-09-13 6:12 ` Peter Xu
@ 2017-09-13 7:58 ` Cornelia Huck
2017-09-14 5:40 ` Peter Xu
1 sibling, 1 reply; 9+ messages in thread
From: Cornelia Huck @ 2017-09-13 7:58 UTC (permalink / raw)
To: Marc-André Lureau
Cc: Peter Xu, Laurent Vivier, QEMU, Dr. David Alan Gilbert
On Tue, 12 Sep 2017 12:17:51 +0200
Marc-André Lureau <marcandre.lureau@gmail.com> wrote:
> Hi Peter
>
> On Tue, Sep 12, 2017 at 5:33 AM, Peter Xu <peterx@redhat.com> wrote:
> > On Mon, Sep 11, 2017 at 03:26:27PM +0200, Cornelia Huck wrote:
> >> It does not really make sense to dump memory that is not there.
> >>
> >> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> >> with no filter for a machine with no memory defined.
> >>
> >> New behaviour is:
> >>
> >> (qemu) dump-guest-memory /dev/null
> >> dump: no guest memory to dump
> >> (qemu) dump-guest-memory /dev/null 0 4096
> >> dump: no guest memory to dump
> >>
> >> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> >> ---
> >>
> >> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
> >
> > I thought Marc-André had proposed to be the maintainer? But indeed I
> > didn't see the line in maintainer file.
> >
> > Anyway, if anyone think I am ok to maintain this single file
> > (considering that I haven't posted patches on it for 2 years, and I
> > haven't been working on any kind of maintainer job), please let me
> > know. I'm glad to start with it (or with Marc-André).
> >
>
> That would be great!
> thanks
Now on to the most important question: Will you merge this patch? :)
(It should probably go together with "tests/hmp: test "none" machine
with memory".)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] dump: do not dump non-existent guest memory
2017-09-13 7:58 ` Cornelia Huck
@ 2017-09-14 5:40 ` Peter Xu
0 siblings, 0 replies; 9+ messages in thread
From: Peter Xu @ 2017-09-14 5:40 UTC (permalink / raw)
To: Cornelia Huck
Cc: Marc-André Lureau, Laurent Vivier, QEMU,
Dr. David Alan Gilbert
On Wed, Sep 13, 2017 at 09:58:04AM +0200, Cornelia Huck wrote:
> On Tue, 12 Sep 2017 12:17:51 +0200
> Marc-André Lureau <marcandre.lureau@gmail.com> wrote:
>
> > Hi Peter
> >
> > On Tue, Sep 12, 2017 at 5:33 AM, Peter Xu <peterx@redhat.com> wrote:
> > > On Mon, Sep 11, 2017 at 03:26:27PM +0200, Cornelia Huck wrote:
> > >> It does not really make sense to dump memory that is not there.
> > >>
> > >> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> > >> with no filter for a machine with no memory defined.
> > >>
> > >> New behaviour is:
> > >>
> > >> (qemu) dump-guest-memory /dev/null
> > >> dump: no guest memory to dump
> > >> (qemu) dump-guest-memory /dev/null 0 4096
> > >> dump: no guest memory to dump
> > >>
> > >> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > >> ---
> > >>
> > >> Another unmaintained file. Joy. cc:ing some more-or-less random folks.
> > >
> > > I thought Marc-André had proposed to be the maintainer? But indeed I
> > > didn't see the line in maintainer file.
> > >
> > > Anyway, if anyone think I am ok to maintain this single file
> > > (considering that I haven't posted patches on it for 2 years, and I
> > > haven't been working on any kind of maintainer job), please let me
> > > know. I'm glad to start with it (or with Marc-André).
> > >
> >
> > That would be great!
> > thanks
>
> Now on to the most important question: Will you merge this patch? :)
>
> (It should probably go together with "tests/hmp: test "none" machine
> with memory".)
I posted a RFC to maintain this file with Marc-André Lureau, but not
getting any acks yet, so I guess at least I don't have that
permission, yet...
And I see Laruent posted this already:
[Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault
So I assume all these four patches can go with Dave's tree. Thanks,
--
Peter Xu
^ permalink raw reply [flat|nested] 9+ messages in thread