Received: from eggs.gnu.org ([2001:4830:134:3::10]:45436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGlVO-0002al-20 for qemu-devel@nongnu.org; Tue, 03 Sep 2013 03:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGlVF-0007rf-4o for qemu-devel@nongnu.org; Tue, 03 Sep 2013 03:58:30 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:55255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGlVE-0007pU-Qm for qemu-devel@nongnu.org; Tue, 03 Sep 2013 03:58:21 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Sep 2013 08:52:51 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id DE63917D805D for ; Tue, 3 Sep 2013 08:58:19 +0100 (BST) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r837w5YJ393568 for ; Tue, 3 Sep 2013 07:58:05 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r837wFfQ021544 for ; Tue, 3 Sep 2013 01:58:16 -0600 From: Christian Borntraeger Date: Tue, 3 Sep 2013 09:58:33 +0200 Message-Id: <1378195117-60980-3-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1378195117-60980-1-git-send-email-borntraeger@de.ibm.com> References: <1378195117-60980-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 2/6] s390/dump: zero out padding bytes in notes sections List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Cornelia Huck , Christian Borntraeger , Jens Freimann , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel The prstatus of an s390x dump contains several padding areas. Zero out these bytes to make reading the notes section easier with a hexdump. Signed-off-by: Christian Borntraeger --- target-s390x/arch_dump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-s390x/arch_dump.c b/target-s390x/arch_dump.c index 9d36116..5cbb53c 100644 --- a/target-s390x/arch_dump.c +++ b/target-s390x/arch_dump.c @@ -151,6 +151,7 @@ static int s390x_write_all_elf64_notes(const char *note_name, int ret = -1; for (nf = note_func; nf->note_contents_func; nf++) { + memset(¬e, 0, sizeof(note)); note.hdr.n_namesz = cpu_to_be32(sizeof(note.name)); note.hdr.n_descsz = cpu_to_be32(nf->contents_size); strncpy(note.name, note_name, sizeof(note.name)); -- 1.8.3.1