Cover Letter Detail
Show a cover letter.
GET /api/covers/812442/?format=api
{ "id": 812442, "url": "http://patchwork.ozlabs.org/api/covers/812442/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20170911165929.2791-1-marcandre.lureau@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170911165929.2791-1-marcandre.lureau@redhat.com>", "list_archive_url": null, "date": "2017-09-11T16:59:22", "name": "[v6,0/7] KASLR kernel dump support", "submitter": { "id": 66774, "url": "http://patchwork.ozlabs.org/api/people/66774/?format=api", "name": "Marc-André Lureau", "email": "marcandre.lureau@redhat.com" }, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20170911165929.2791-1-marcandre.lureau@redhat.com/mbox/", "series": [ { "id": 2525, "url": "http://patchwork.ozlabs.org/api/series/2525/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2525", "date": "2017-09-11T16:59:22", "name": "KASLR kernel dump support", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/2525/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/812442/comments/", "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=marcandre.lureau@redhat.com" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrZ1F0YDcz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 03:00:15 +1000 (AEST)", "from localhost ([::1]:59148 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drS4C-0005rK-KL\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 13:00:12 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:57551)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <marcandre.lureau@redhat.com>) id 1drS3g-0005q1-Pz\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 12:59:42 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <marcandre.lureau@redhat.com>) id 1drS3d-00072Y-OR\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 12:59:40 -0400", "from mx1.redhat.com ([209.132.183.28]:54212)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <marcandre.lureau@redhat.com>)\n\tid 1drS3d-00072N-FU\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 12:59:37 -0400", "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 1A2AC18423D\n\tfor <qemu-devel@nongnu.org>; Mon, 11 Sep 2017 16:59:36 +0000 (UTC)", "from localhost (ovpn-112-51.ams2.redhat.com [10.36.112.51])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 7E0696B26F;\n\tMon, 11 Sep 2017 16:59:31 +0000 (UTC)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 1A2AC18423D", "From": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>", "To": "qemu-devel@nongnu.org", "Date": "Mon, 11 Sep 2017 18:59:22 +0200", "Message-Id": "<20170911165929.2791-1-marcandre.lureau@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]);\n\tMon, 11 Sep 2017 16:59:36 +0000 (UTC)", "Content-Transfer-Encoding": "quoted-printable", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]", "X-Received-From": "209.132.183.28", "Subject": "[Qemu-devel] [PATCH v6 0/7] KASLR kernel dump support", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "ehabkost@redhat.com, mst@redhat.com, anderson@redhat.com, =?utf-8?q?Ma?=\n\t=?utf-8?q?rc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n\timammedo@redhat.com, lersek@redhat.com", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "Recent linux kernels enable KASLR to randomize phys/virt memory\naddresses. This series aims to provide enough information in qemu\ndumps so that crash utility can work with randomized kernel too (it\nhasn't been tested on other archs than x86 though, help welcome).\n\nThe previous design to provide qemu with debug details (using qemu-ga\nand a dedicated vmcoreinfo ACPI device) failed to satisfy the\nrequirements during previous iterations.\n\nIn particular, the previous proposed vmcoreinfo ACPI device had the\nfollowing issues:\n- hazardous memory handling with no explicit synchronization\n- occupy 2 fw-cfg entries (for memory and pointer)\n- occupy 4k of guest memory (this could have been tweaked)\n- did not provide ACPI methods (this could have been added)\n- may be difficult to maintain compatibility (according to Michael)\n\nThis is a new proposal, that leverage fw-cfg device instead of adding\na new device. A \"etc/vmcoreinfo\" entry is added, where the guest,\nduring boot or later, can write the addr/size location of an ELF note\nto be appended in the qemu dump.\n\nNote: only guest kernel is expected to write to a fw-cfg entry. This\nmethod is not meant for general qemu/user-space communication. There\nare more appropriate devices for this purpose, and the guest kernel\nshould not expose this facility.\n\nThis is quite easier to implement, and uses less of the limited fw-cfg\nslots, and guest memory. It also solves the synchronization issue, and\nmay be easier to discover or to maintain compatibility.\n\nThe Linux ELF note is expected to be the VMCOREINFO note, which will\nhave a special handling in qemu in this case helping kaslr-kernel\ndebugging. But it could be any valid ELF note.\n\nCrash 7.1.9 will parse the \"phys_base\" value from the VMCOREINFO note,\nand thus will work with KASLR-dump produced by this series.\n\nThe series implements the note addition in qemu ELF/kdump,\nas well as the python scripts/dump-guest-memory.py.\n\nTo test:\n\nUsing kernel from https://github.com/elmarco/linux fw-cfg branch,\nCompile and run guest kernel with CONFIG_RANDOMIZE_BASE=y & CONFIG_FW_CFG_SYSFS=y.\n\nRun qemu with -device vmcoreinfo\n\nProduce an ELF dump:\n{ \"execute\": \"dump-guest-memory\", \"arguments\": { \"protocol\": \"file:dump\", \"paging\": false } }\n\nProduce a kdump:\n{ \"execute\": \"dump-guest-memory\", \"arguments\": { \"protocol\": \"file:dump\", \"paging\": false, \"format\": \"kdump-zlib\" } }\n\nOr with (gdb) dump-guest-memory, with scripts/dump-guest-memory.py script.\n\nAnalyze with crash >= 7.1.9 (or the git version for 4.13 fixes..):\n\n$ crash vmlinux dump\n\nv6: after Michael Tsirkin review\n- rebased\n- modify fw_cfg write callback, called for all write\n- back to a seperate -device vmcoreinfo\n- add host_format/guest_format fields\n- clear/reset fw_cfg entry values on reset\n- write 0 as guest format to disable device\n\nv5:\n- removed x-write-pointer-available patch from this series\n- drop vmcoreinfo device\n- add write callback to fw_cfg entries\n- add a writable fw_cfg \"vmcoreinfo\" entry\n- split phys_base update from VMCOREINFO note in a seperate patch\n- most patches had non-trivial changes, dropping reviewed-by tags\n\nv4: from Laszlo review\n- switch to warn_report*()\n- update test to follow vmgenid and use boot-sector infrastructure\n- fix range checks in the python script\n- add vmcoreinfo_get() stub\n\nv3: from Laszlo review\n- change vmcoreinfo offset to 36\n- reset err to null after report\n- use PRIu32\n- change name_size and desc_size against MAX_VMCOREINFO_SIZE\n- python code simplification\n- check boundaries of blocks in phys_memory_read()\n- fix some vmgi vs vmci names\n- add more comments in code\n- fix comment indentation\n- add r-b tags\n\nv2: from Laszlo review\n- vmci: fix guest endianess handling\n- vmci: fix wrong sizeof()\n- vmci: add back reset logic from vmgenid\n- dump: have 1MB size limit for vmcoreinfo\n- dump: fix potential off-by-1 buffer manipulation\n- dump: use temporary variable for qemu_strtou64\n- dump: fixed VMCOREINFO duplication in kdump\n- update gdb script to not call into qemu process\n- update MAINTAINERS with some new files\n\nMarc-André Lureau (7):\n fw_cfg: add write callback\n hw/misc: add vmcoreinfo device\n dump: add guest ELF note\n dump: update phys_base header field based on VMCOREINFO content\n kdump: set vmcoreinfo location\n scripts/dump-guest-memory.py: add vmcoreinfo\n MAINTAINERS: add Dump maintainers\n\n scripts/dump-guest-memory.py | 61 +++++++++++++++\n include/hw/misc/vmcoreinfo.h | 46 +++++++++++\n include/hw/nvram/fw_cfg.h | 3 +\n include/sysemu/dump.h | 2 +\n dump.c | 183 +++++++++++++++++++++++++++++++++++++++++++\n hw/acpi/vmgenid.c | 2 +-\n hw/core/loader.c | 2 +-\n hw/i386/acpi-build.c | 2 +-\n hw/isa/lpc_ich9.c | 4 +-\n hw/misc/vmcoreinfo.c | 96 +++++++++++++++++++++++\n hw/nvram/fw_cfg.c | 14 +++-\n MAINTAINERS | 11 +++\n docs/specs/vmcoreinfo.txt | 49 ++++++++++++\n hw/misc/Makefile.objs | 1 +\n 14 files changed, 467 insertions(+), 9 deletions(-)\n create mode 100644 include/hw/misc/vmcoreinfo.h\n create mode 100644 hw/misc/vmcoreinfo.c\n create mode 100644 docs/specs/vmcoreinfo.txt" }