From patchwork Tue Sep 3 07:58:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 272146 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 825C52C009C for ; Tue, 3 Sep 2013 17:59:14 +1000 (EST) Received: from localhost ([::1]:43834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGlW3-0002oI-NG for incoming@patchwork.ozlabs.org; Tue, 03 Sep 2013 03:59:11 -0400 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 d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 3 Sep 2013 08:52:49 +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 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r837wF6d021523; Tue, 3 Sep 2013 01:58:15 -0600 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id 8D0A3122443A; Tue, 3 Sep 2013 09:58:15 +0200 (CEST) From: Christian Borntraeger To: Alexander Graf Date: Tue, 3 Sep 2013 09:58:33 +0200 Message-Id: <1378195117-60980-3-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1378195117-60980-1-git-send-email-borntraeger@de.ibm.com> References: <1378195117-60980-1-git-send-email-borntraeger@de.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13090307-2966-0000-0000-000008A23D57 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.109 Cc: Cornelia Huck , Christian Borntraeger , Jens Freimann , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel Subject: [Qemu-devel] [PULL 2/6] s390/dump: zero out padding bytes in notes sections X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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));