From patchwork Wed Feb 22 21:12:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viktor Prutyanov X-Patchwork-Id: 13149601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27C0CC636D6 for ; Wed, 22 Feb 2023 21:13:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUwQC-0000U0-0D; Wed, 22 Feb 2023 16:13:04 -0500 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 1pUwQA-0000TS-E1 for qemu-devel@nongnu.org; Wed, 22 Feb 2023 16:13:02 -0500 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUwQ7-0005Bn-HK for qemu-devel@nongnu.org; Wed, 22 Feb 2023 16:13:00 -0500 Received: by mail-lf1-x130.google.com with SMTP id f18so11798903lfa.3 for ; Wed, 22 Feb 2023 13:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+8h4YGgnKZnL9y/e4Cj/Uj4Rec7WyQjBeNV+uwigNHw=; b=uqSzsddgJO7SJUudt6JePShtTnoikzaUtVnF3X3AWC1QwBVBLeuZncryFT3pcD++23 lLuE1Qc3WWAq2EI9opD/0Ox2XkdJtt6iXWTKORJTvL0ec/mi4DYHFcHaD6noubQXLUY9 eA5RcUr3Hs2hbL+80/0atKs3kSWlC2RTLGQm117x7juk8yEj6dXDolSXr487F8vzc3pn 0KgPv/te4cgMBe2/UToJ8qc9XG3LRX2j1SSBFVp9I7ttxEXP4Y7At0YKiP80cypTcXou Rh/Xp2kSIkSDFAKkgYsoo6EFFepxOVGj48f+UNwDWtW7zfBU+zn9+TgJcdyv9f1ss7bx DDIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+8h4YGgnKZnL9y/e4Cj/Uj4Rec7WyQjBeNV+uwigNHw=; b=K4SeeUAvX1vV+SQlx3aCQ6A1Ua+2PhF52nmF9+K1443u27MOo7GiC+5Y/aa9bKGVZg Hh/T9TmaZ1rGIO5KNoACEoM21Ri84gGMLSLBiq+63/kTu38iOL7YERlkHcqeVOPoI6ku 6jwlETsAhEMUTGZaexuda5NtMfA8cm58dlTEpwy5/oTz6nJU/sVKIX1YnifVSGZX+L0u AjEJbucvS9tvAFoIp70wAWhyEoKcHyqEhDpndFtnodBXZPBXpw0XMXxsGX+beTly5U/u Z1uiZEfaKW8JeZOucMOjcGC+SIXz2PWxfZxL21GUAa9s1s6HuUGVKNwTKhegkoyG6u31 nmxA== X-Gm-Message-State: AO0yUKXYgWGZRf51ZZVwE/wo0LFT8q9yB07WBe13LjyLFXD4A15ElgMD LPHi28902eCp8W9uYh6TmQgazQ== X-Google-Smtp-Source: AK7set+Zbcu7ebYlAmcoODl7MY27+MQbA2kzwlb4i/QcS72SVTI+EkboUbwtZuRaeOJSBkafprgh7A== X-Received: by 2002:ac2:4474:0:b0:4a4:68b9:66f3 with SMTP id y20-20020ac24474000000b004a468b966f3mr3542337lfl.62.1677100376784; Wed, 22 Feb 2023 13:12:56 -0800 (PST) Received: from vp-pc.. (46-138-232-132.dynamic.spd-mgts.ru. [46.138.232.132]) by smtp.gmail.com with ESMTPSA id v15-20020ac2558f000000b004db0d97b053sm330068lfg.137.2023.02.22.13.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 13:12:56 -0800 (PST) From: Viktor Prutyanov To: annie.li@oracle.com, pbonzini@redhat.com, peter.maydell@linaro.org Cc: viktor.prutyanov@phystech.edu, yuri.benditovich@daynix.com, yan@daynix.com, qemu-devel@nongnu.org, viktor@daynix.com Subject: [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support Date: Thu, 23 Feb 2023 00:12:43 +0300 Message-Id: <20230222211246.883679-1-viktor@daynix.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Received-SPF: none client-ip=2a00:1450:4864:20::130; envelope-from=viktor@daynix.com; helo=mail-lf1-x130.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Hi, For now, elf2dmp is unable to convert ELF-dump to DMP-dump made of Windows Server 2022 guest. This patch series fixes it. v1: improve code-style fix v2: don't remove data directory entry RVA print and DOS header size check Viktor Prutyanov (3): contrib/elf2dmp: fix code style contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry contrib/elf2dmp: add PE name check and Windows Server 2022 support contrib/elf2dmp/addrspace.c | 1 + contrib/elf2dmp/main.c | 108 ++++++++++++++++++++++----------- contrib/elf2dmp/pe.h | 115 ++++++++++++++++++++---------------- 3 files changed, 140 insertions(+), 84 deletions(-) Reviewed-by: Annie Li