From: Dave Anderson <anderson@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com,
mdroth@linux.vnet.ibm.com, armbru@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH 00/21] WIP: dump: add kaslr support (for after 2.9)
Date: Sat, 11 Mar 2017 09:31:16 -0500 (EST) [thread overview]
Message-ID: <575162409.892468.1489242676618.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170311132256.22951-1-marcandre.lureau@redhat.com>
----- Original Message -----
> Hi,
>
> Latest linux kernel enabled kaslr to randomize phys/virt memory
> addresses. There has been some effort to support kexec/kdump so that
> crash utility can still works in case crashed kernel has kaslr
> enabled.
>
> This series aims to provide enough information in qemu dumps so that
> crash utility can work with kaslr kernel too, with x86_64 guests (it
> hasn't been tested on other archs, help welcome).
>
> Two pieces of informations are necessary: the phys_base (the physical
> address where the kernel is loaded) and the kaslr offset. Other useful
> informations for debugging are provided in Linux vmcoreinfo too.
>
> There has been discussions to provide those details in early boot,
> with ACPI, fw_cfg, virtio-pstore etc, but none has reached a consensus
> yet. A possiblity for now is to provide the information when qemu-ga
> starts. This has the advantage of working with older guests and may
> not be incompatible with future methods (in this case it could ignore
> qga info for example). The drawback is that qemu will have to parse
> the json stream. For now it stops processing it whem VMDUMP_INFO is
> received. It would be wise to introduce a QMP welcome message, so that
> qemu would stop immediately processing the stream if the agent doesn't
> have the event. Another option is to create a seperate channel...
> I welcome other ideas and discussion.
>
> crash upstream doesn't yet parse NUMBER(phys_base). You may pass it to
> crash with --machdep phys_base=0x.. provided you snooped on qga.
FYI: a patch to utilize NUMBER(phys_base) has been checked in upstream:
https://github.com/crash-utility/crash/commit/ed60e97e319a1cfc9e2779aa1baac305677393d8
Linux 4.10 commit 401721ecd1dcb0a428aa5d6832ee05ffbdbffbbe finally
exports the x86_64 "phys_base" value in the VMCOREINFO note, so
utilize it whenever it exists.
(anderson@redhat.com)
Thanks,
Dave
> kdump kaslr-dumps should now work with crash out of the box.
>
> A large part of the series has to do with json and the qobject type
> system to deal with uint64 values, so that addresses can now be sent
> over json. The second halfs adds qga VMDUMP_INFO event, and ELF/kdump
> dumping. Depending on the feedback, I will probably split the series,
> but for those who would like to try it, help or suggest ideas, here is
> the whole thing.
>
> cheers
>
> Marc-André Lureau (21):
> qapi: add info comment for generated types
> pci-host: use more specific type names
> object: fix potential leak in getters
> qobject: add quint type
> qapi: update the qobject visitor to use QUInt
> json: learn to parse uint64 numbers
> object: add uint property setter/getter
> qdev: use int and uint properties
> qdev: use appropriate type
> Use uint property getter/setter where appropriate
> qdict: learn to lookup quint
> test-qga: drop everything until guest-sync
> qga: report error on keyfile dump error
> qga: add and populate VMDumpInfo
> qga: register event emit function
> qga: emit VMDUMP_INFO event
> virtio-channel: parse qga stream for VMDUMP_INFO event
> dump: use qga VMDUMP_INFO for ELF dump
> kdump: write vmcoreinfo in header
> scripts/dump-guest-memory.py: fix int128_get64 on recent gcc
> scripts/dump-guest-memory.py: add VMCOREINFO
>
> qapi/introspect.json | 2 +-
> scripts/qapi.py | 39 ++++---
> scripts/dump-guest-memory.py | 66 ++++++++++-
> scripts/qapi-event.py | 4 +-
> scripts/qapi-types.py | 17 +--
> scripts/qapi-visit.py | 3 +-
> include/hw/isa/isa.h | 2 +-
> include/hw/qdev-core.h | 5 +-
> include/hw/qdev-properties.h | 59 ++++++----
> include/qapi/qmp/qdict.h | 2 +
> include/qapi/qmp/quint.h | 25 +++++
> include/qapi/qmp/types.h | 1 +
> include/qom/object.h | 23 ++++
> include/sysemu/dump-info.h | 15 +++
> include/sysemu/dump.h | 2 +
> qga/guest-agent-core.h | 2 +
> block/qapi.c | 5 +
> dump.c | 184
> ++++++++++++++++++++++++++++++-
> hw/acpi/memory_hotplug.c | 10 +-
> hw/acpi/nvdimm.c | 10 +-
> hw/acpi/pcihp.c | 6 +-
> hw/arm/aspeed.c | 4 +-
> hw/arm/bcm2835_peripherals.c | 9 +-
> hw/arm/raspi.c | 4 +-
> hw/block/fdc.c | 54 ++++-----
> hw/char/virtio-console.c | 53 +++++++++
> hw/core/platform-bus.c | 2 +-
> hw/core/qdev-properties.c | 8 +-
> hw/core/qdev.c | 8 +-
> hw/i386/acpi-build.c | 70 ++++++------
> hw/i386/pc.c | 6 +-
> hw/intc/arm_gicv3_common.c | 2 +-
> hw/mem/pc-dimm.c | 5 +-
> hw/misc/auxbus.c | 2 +-
> hw/misc/pvpanic.c | 2 +-
> hw/net/e1000e.c | 14 +--
> hw/pci-host/gpex.c | 2 +-
> hw/pci-host/piix.c | 8 +-
> hw/pci-host/q35.c | 12 +-
> hw/pci-host/xilinx-pcie.c | 2 +-
> hw/ppc/pnv_core.c | 2 +-
> hw/ppc/spapr.c | 8 +-
> numa.c | 6 +-
> qapi/qobject-input-visitor.c | 30 ++++-
> qapi/qobject-output-visitor.c | 3 +-
> qga/channel-posix.c | 11 ++
> qga/main.c | 162 ++++++++++++++++++++++++++-
> qobject/json-lexer.c | 4 +
> qobject/json-parser.c | 19 +++-
> qobject/qdict.c | 37 ++++++-
> qobject/qjson.c | 8 ++
> qobject/qobject.c | 1 +
> qobject/quint.c | 58 ++++++++++
> qom/object.c | 38 ++++++-
> target/i386/cpu.c | 6 +-
> tests/check-qdict.c | 31 ++++++
> tests/check-qint.c | 59 ++++++++++
> tests/check-qjson.c | 28 +++++
> tests/test-qga.c | 27 +++--
> tests/test-qobject-input-visitor.c | 15 +++
> tests/test-qobject-output-visitor.c | 19 +++-
> ui/console.c | 4 +-
> util/qemu-option.c | 6 +
> xen-hvm.c | 6 +-
> Makefile | 7 +-
> qga/Makefile.objs | 1 +
> qga/qapi-schema.json | 15 +++
> qobject/Makefile.objs | 2 +-
> tests/qapi-schema/comments.out | 2 +-
> tests/qapi-schema/empty.out | 2 +-
> tests/qapi-schema/event-case.out | 2 +-
> tests/qapi-schema/ident-with-escape.out | 2 +-
> tests/qapi-schema/include-relpath.out | 2 +-
> tests/qapi-schema/include-repetition.out | 2 +-
> tests/qapi-schema/include-simple.out | 2 +-
> tests/qapi-schema/indented-expr.out | 2 +-
> tests/qapi-schema/qapi-schema-test.out | 2 +-
> 77 files changed, 1153 insertions(+), 227 deletions(-)
> create mode 100644 include/qapi/qmp/quint.h
> create mode 100644 include/sysemu/dump-info.h
> create mode 100644 qobject/quint.c
>
> --
> 2.12.0.191.gc5d8de91d
>
>
next prev parent reply other threads:[~2017-03-11 14:31 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 13:22 [Qemu-devel] [PATCH 00/21] WIP: dump: add kaslr support (for after 2.9) Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 01/21] qapi: add info comment for generated types Marc-André Lureau
2017-03-13 7:01 ` Markus Armbruster
2017-03-11 13:22 ` [Qemu-devel] [PATCH 02/21] pci-host: use more specific type names Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 03/21] object: fix potential leak in getters Marc-André Lureau
2017-03-21 14:43 ` Eric Blake
2017-04-23 17:16 ` Michael Tokarev
2017-03-11 13:22 ` [Qemu-devel] [PATCH 04/21] qobject: add quint type Marc-André Lureau
2017-03-11 20:17 ` Eric Blake
2017-03-13 7:15 ` Markus Armbruster
2017-03-13 13:21 ` Eric Blake
2017-03-13 13:28 ` Marc-André Lureau
2017-03-21 12:41 ` Marc-André Lureau
2017-03-21 16:49 ` Markus Armbruster
2017-03-21 17:06 ` Eric Blake
2017-03-21 17:46 ` Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 05/21] qapi: update the qobject visitor to use QUInt Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 06/21] json: learn to parse uint64 numbers Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 07/21] object: add uint property setter/getter Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 08/21] qdev: use int and uint properties Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 09/21] qdev: use appropriate type Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 10/21] Use uint property getter/setter where appropriate Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 11/21] qdict: learn to lookup quint Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 12/21] test-qga: drop everything until guest-sync Marc-André Lureau
2017-03-11 20:07 ` Eric Blake
2017-03-11 13:22 ` [Qemu-devel] [PATCH 13/21] qga: report error on keyfile dump error Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 14/21] qga: add and populate VMDumpInfo Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 15/21] qga: register event emit function Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 16/21] qga: emit VMDUMP_INFO event Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 17/21] virtio-channel: parse qga stream for " Marc-André Lureau
2017-04-05 16:12 ` Daniel P. Berrange
[not found] ` <CAJ+F1C+2x=0pZxMz8FgxbkQD59zM2pngHKv7AT-hv-KA6xjN+Q@mail.gmail.com>
2017-04-05 16:38 ` Marc-André Lureau
2017-04-05 17:06 ` Eric Blake
2017-04-05 17:39 ` Daniel P. Berrange
2017-03-11 13:22 ` [Qemu-devel] [PATCH 18/21] dump: use qga VMDUMP_INFO for ELF dump Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 19/21] kdump: write vmcoreinfo in header Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 20/21] scripts/dump-guest-memory.py: fix int128_get64 on recent gcc Marc-André Lureau
2017-03-11 13:22 ` [Qemu-devel] [PATCH 21/21] scripts/dump-guest-memory.py: add VMCOREINFO Marc-André Lureau
2017-03-11 13:47 ` [Qemu-devel] [PATCH 00/21] WIP: dump: add kaslr support (for after 2.9) no-reply
2017-03-11 14:31 ` Dave Anderson [this message]
2017-04-05 16:01 ` Paolo Bonzini
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=575162409.892468.1489242676618.JavaMail.zimbra@redhat.com \
--to=anderson@redhat.com \
--cc=armbru@redhat.com \
--cc=lersek@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).