From nobody Mon Nov 25 07:46:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1716467941; cv=none; d=zohomail.com; s=zohoarc; b=YXH0oGevMuF3p8xLxjCDYlctkJzyzICKKhMzBMR8dm6HRYVag9i1w965KYa9ajjuLDswcNBmvCV57EFKsA8yXjmT3zpieuOSo1wH5u+OwCaT7YBLzTOhDEdcJjBMqH8K9tdAEM48sr1eiAViBLYtHIRpVrmBC6M0zz4h7RtCwPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716467941; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vAgt1RpgdFgV/zYLHvOTRL3qZWyBlBPluqCxLWrAE8w=; b=DrR98jygOtE1s7d1DJxjlColMo18BCwV+180+7MYQyYHY6pPtwOM4B/Tmr57uMW7geY2xbIHNL+qB4suWDFZEjSszi78tfRvZTb6vXQ7FadtgTw7xC3Gxaw4dfGW9XYyEh7aPsqTC1POxPbbvpXnXkrp6o4XCM6mAu30+FzVCN8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716467941613598.6720722080676; Thu, 23 May 2024 05:39:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sA7hi-000451-Sf; Thu, 23 May 2024 08:37:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA3s0-0003wn-Gp for qemu-devel@nongnu.org; Thu, 23 May 2024 04:32:16 -0400 Received: from mgamail.intel.com ([192.198.163.7]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA3ry-0004Nm-2t for qemu-devel@nongnu.org; Thu, 23 May 2024 04:32:16 -0400 Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2024 01:32:08 -0700 Received: from flexbp2.sh.intel.com (HELO localhost) ([10.239.82.162]) by orviesa007.jf.intel.com with ESMTP; 23 May 2024 01:32:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716453134; x=1747989134; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=nT8UVHoVMPvOayZ++Vv/EwsYJ0iAXVuVzWJs/feu1dY=; b=j3qAXNJz34GNOAsUR169SNVq9j0z6sH3okvF05LNmcPbOdiChhHfOaoX 7pY2ptIRMzFZux5/990OxVaGxf8mY7SG2MQnc6xdGI7FIgIBOIaIMDL9h McJxm4spKMC1W/KjZnMePsFZ2dErF3hykJFf2etEc9EhOKFqomaVwk1bj W5w99Ztx+IeQP/r8y3DLikuKiV+JxlbUIosbq7WQtM7ULTp+GZ5ncPL26 Re21/7EFBgfIprO31vP8punyrKwkcJn+DNbwoebMvimeK9OPsUYIuZlIo wjKE9i5XVPleKmsP0o2wjK3HrcLofUK8+bu+EfGj42Cm/KPWR6pae0c8y g==; X-CSE-ConnectionGUID: dklwAa1aRTu1k2cb/xhXNA== X-CSE-MsgGUID: YorTke9FQCaIUGlmPqnC0w== X-IronPort-AV: E=McAfee;i="6600,9927,11080"; a="38134070" X-IronPort-AV: E=Sophos;i="6.08,182,1712646000"; d="scan'208,223";a="38134070" X-CSE-ConnectionGUID: Y89ueP43S+mcdK6iGBOhcw== X-CSE-MsgGUID: DB2JQ678TGqKyH7Ul9wdaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,182,1712646000"; d="scan'208,223";a="34193705" From: Zhibin Li To: qemu-devel@nongnu.org Cc: zhibin.li@intel.com Subject: [PATCH] dump: use 10 base for phys_base Date: Thu, 23 May 2024 16:32:05 +0800 Message-ID: <20240523083205.2248593-1-zhibin.li@intel.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.198.163.7; envelope-from=zhibin.li@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 23 May 2024 08:37:51 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1716467942048100001 Content-Type: text/plain; charset="utf-8" From vmcoreinfo 'phys_base' is a decimal instead a hexadecimal so use base = of 10 instead of 16 when converting this string. Signed-off-by: Zhibin Li --- Hi everyone. I'm trying to use 'dump-guest-memory' QMP command to generate = a kdump-compressed vmcore file which can be consumed by makedumpfile tool (= the command I used is: `dump-guest-memory -l -R test.bin`). I found that the generated vmcore cannot be parsed correctly by 'makedumpfi= le' and I noticed that the 'phys_base' is incorrect with KASLR enabled. Thi= s is just a quick fix and please let me know if you have any comments. By the way, with this fix 'makedumpfile' can proceed to handle the generate= d vmcore but later on some other issues were found. I'm still trying to deb= ug this. If you have any BKMs about using 'makedumpfile' with QEMU please l= et me know. Thanks! dump/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump/dump.c b/dump/dump.c index 84064d890d..e42ab3ccac 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1760,7 +1760,7 @@ static void vmcoreinfo_update_phys_base(DumpState *s) } =20 if (prefix && g_str_has_prefix(lines[i], prefix)) { - if (qemu_strtou64(lines[i] + strlen(prefix), NULL, 16, + if (qemu_strtou64(lines[i] + strlen(prefix), NULL, 10, &phys_base) < 0) { warn_report("Failed to read %s", prefix); } else { --=20 2.43.2