All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support
@ 2023-02-22 21:12 Viktor Prutyanov
  2023-02-22 21:12 ` [PATCH v2 1/3] contrib/elf2dmp: fix code style Viktor Prutyanov
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Viktor Prutyanov @ 2023-02-22 21:12 UTC (permalink / raw)
  To: annie.li, pbonzini, peter.maydell
  Cc: viktor.prutyanov, yuri.benditovich, yan, qemu-devel, viktor

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(-)

-- 
2.35.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/3] contrib/elf2dmp: fix code style
  2023-02-22 21:12 [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support Viktor Prutyanov
@ 2023-02-22 21:12 ` Viktor Prutyanov
  2023-02-22 21:12 ` [PATCH v2 2/3] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry Viktor Prutyanov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Viktor Prutyanov @ 2023-02-22 21:12 UTC (permalink / raw)
  To: annie.li, pbonzini, peter.maydell
  Cc: viktor.prutyanov, yuri.benditovich, yan, qemu-devel, viktor

Originally elf2dmp were added with some code style issues,
especially in pe.h header, and some were introduced by
2d0fc797faaa73fbc1d30f5f9e90407bf3dd93f0. Fix them now.

Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
---
 contrib/elf2dmp/addrspace.c |   1 +
 contrib/elf2dmp/main.c      |   9 ++--
 contrib/elf2dmp/pe.h        | 100 ++++++++++++++++++------------------
 3 files changed, 57 insertions(+), 53 deletions(-)

diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp/addrspace.c
index 53ded17061..0b04cba00e 100644
--- a/contrib/elf2dmp/addrspace.c
+++ b/contrib/elf2dmp/addrspace.c
@@ -11,6 +11,7 @@
 static struct pa_block *pa_space_find_block(struct pa_space *ps, uint64_t pa)
 {
     size_t i;
+
     for (i = 0; i < ps->block_nr; i++) {
         if (ps->block[i].paddr <= pa &&
                 pa <= ps->block[i].paddr + ps->block[i].size) {
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index d77b8f98f7..9224764239 100644
--- a/contrib/elf2dmp/main.c
+++ b/contrib/elf2dmp/main.c
@@ -282,14 +282,16 @@ static int fill_header(WinDumpHeader64 *hdr, struct pa_space *ps,
     };
 
     for (i = 0; i < ps->block_nr; i++) {
-        h.PhysicalMemoryBlock.NumberOfPages += ps->block[i].size / ELF2DMP_PAGE_SIZE;
+        h.PhysicalMemoryBlock.NumberOfPages +=
+                ps->block[i].size / ELF2DMP_PAGE_SIZE;
         h.PhysicalMemoryBlock.Run[i] = (WinDumpPhyMemRun64) {
             .BasePage = ps->block[i].paddr / ELF2DMP_PAGE_SIZE,
             .PageCount = ps->block[i].size / ELF2DMP_PAGE_SIZE,
         };
     }
 
-    h.RequiredDumpSpace += h.PhysicalMemoryBlock.NumberOfPages << ELF2DMP_PAGE_BITS;
+    h.RequiredDumpSpace +=
+            h.PhysicalMemoryBlock.NumberOfPages << ELF2DMP_PAGE_BITS;
 
     *hdr = h;
 
@@ -299,7 +301,8 @@ static int fill_header(WinDumpHeader64 *hdr, struct pa_space *ps,
 static int fill_context(KDDEBUGGER_DATA64 *kdbg,
         struct va_space *vs, QEMU_Elf *qe)
 {
-        int i;
+    int i;
+
     for (i = 0; i < qe->state_nr; i++) {
         uint64_t Prcb;
         uint64_t Context;
diff --git a/contrib/elf2dmp/pe.h b/contrib/elf2dmp/pe.h
index c2a4a6ba7c..807d006364 100644
--- a/contrib/elf2dmp/pe.h
+++ b/contrib/elf2dmp/pe.h
@@ -33,70 +33,70 @@ typedef struct IMAGE_DOS_HEADER {
 } __attribute__ ((packed)) IMAGE_DOS_HEADER;
 
 typedef struct IMAGE_FILE_HEADER {
-  uint16_t  Machine;
-  uint16_t  NumberOfSections;
-  uint32_t  TimeDateStamp;
-  uint32_t  PointerToSymbolTable;
-  uint32_t  NumberOfSymbols;
-  uint16_t  SizeOfOptionalHeader;
-  uint16_t  Characteristics;
+    uint16_t  Machine;
+    uint16_t  NumberOfSections;
+    uint32_t  TimeDateStamp;
+    uint32_t  PointerToSymbolTable;
+    uint32_t  NumberOfSymbols;
+    uint16_t  SizeOfOptionalHeader;
+    uint16_t  Characteristics;
 } __attribute__ ((packed)) IMAGE_FILE_HEADER;
 
 typedef struct IMAGE_DATA_DIRECTORY {
-  uint32_t VirtualAddress;
-  uint32_t Size;
+    uint32_t VirtualAddress;
+    uint32_t Size;
 } __attribute__ ((packed)) IMAGE_DATA_DIRECTORY;
 
 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
 
 typedef struct IMAGE_OPTIONAL_HEADER64 {
-  uint16_t  Magic; /* 0x20b */
-  uint8_t   MajorLinkerVersion;
-  uint8_t   MinorLinkerVersion;
-  uint32_t  SizeOfCode;
-  uint32_t  SizeOfInitializedData;
-  uint32_t  SizeOfUninitializedData;
-  uint32_t  AddressOfEntryPoint;
-  uint32_t  BaseOfCode;
-  uint64_t  ImageBase;
-  uint32_t  SectionAlignment;
-  uint32_t  FileAlignment;
-  uint16_t  MajorOperatingSystemVersion;
-  uint16_t  MinorOperatingSystemVersion;
-  uint16_t  MajorImageVersion;
-  uint16_t  MinorImageVersion;
-  uint16_t  MajorSubsystemVersion;
-  uint16_t  MinorSubsystemVersion;
-  uint32_t  Win32VersionValue;
-  uint32_t  SizeOfImage;
-  uint32_t  SizeOfHeaders;
-  uint32_t  CheckSum;
-  uint16_t  Subsystem;
-  uint16_t  DllCharacteristics;
-  uint64_t  SizeOfStackReserve;
-  uint64_t  SizeOfStackCommit;
-  uint64_t  SizeOfHeapReserve;
-  uint64_t  SizeOfHeapCommit;
-  uint32_t  LoaderFlags;
-  uint32_t  NumberOfRvaAndSizes;
-  IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+    uint16_t  Magic; /* 0x20b */
+    uint8_t   MajorLinkerVersion;
+    uint8_t   MinorLinkerVersion;
+    uint32_t  SizeOfCode;
+    uint32_t  SizeOfInitializedData;
+    uint32_t  SizeOfUninitializedData;
+    uint32_t  AddressOfEntryPoint;
+    uint32_t  BaseOfCode;
+    uint64_t  ImageBase;
+    uint32_t  SectionAlignment;
+    uint32_t  FileAlignment;
+    uint16_t  MajorOperatingSystemVersion;
+    uint16_t  MinorOperatingSystemVersion;
+    uint16_t  MajorImageVersion;
+    uint16_t  MinorImageVersion;
+    uint16_t  MajorSubsystemVersion;
+    uint16_t  MinorSubsystemVersion;
+    uint32_t  Win32VersionValue;
+    uint32_t  SizeOfImage;
+    uint32_t  SizeOfHeaders;
+    uint32_t  CheckSum;
+    uint16_t  Subsystem;
+    uint16_t  DllCharacteristics;
+    uint64_t  SizeOfStackReserve;
+    uint64_t  SizeOfStackCommit;
+    uint64_t  SizeOfHeapReserve;
+    uint64_t  SizeOfHeapCommit;
+    uint32_t  LoaderFlags;
+    uint32_t  NumberOfRvaAndSizes;
+    IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
 } __attribute__ ((packed)) IMAGE_OPTIONAL_HEADER64;
 
 typedef struct IMAGE_NT_HEADERS64 {
-  uint32_t Signature;
-  IMAGE_FILE_HEADER FileHeader;
-  IMAGE_OPTIONAL_HEADER64 OptionalHeader;
+    uint32_t Signature;
+    IMAGE_FILE_HEADER FileHeader;
+    IMAGE_OPTIONAL_HEADER64 OptionalHeader;
 } __attribute__ ((packed)) IMAGE_NT_HEADERS64;
 
 typedef struct IMAGE_DEBUG_DIRECTORY {
-  uint32_t Characteristics;
-  uint32_t TimeDateStamp;
-  uint16_t MajorVersion;
-  uint16_t MinorVersion;
-  uint32_t Type;
-  uint32_t SizeOfData;
-  uint32_t AddressOfRawData;
-  uint32_t PointerToRawData;
+    uint32_t Characteristics;
+    uint32_t TimeDateStamp;
+    uint16_t MajorVersion;
+    uint16_t MinorVersion;
+    uint32_t Type;
+    uint32_t SizeOfData;
+    uint32_t AddressOfRawData;
+    uint32_t PointerToRawData;
 } __attribute__ ((packed)) IMAGE_DEBUG_DIRECTORY;
 
 #define IMAGE_DEBUG_TYPE_CODEVIEW   2
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/3] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry
  2023-02-22 21:12 [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support Viktor Prutyanov
  2023-02-22 21:12 ` [PATCH v2 1/3] contrib/elf2dmp: fix code style Viktor Prutyanov
@ 2023-02-22 21:12 ` Viktor Prutyanov
  2023-02-22 21:12 ` [PATCH v2 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support Viktor Prutyanov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Viktor Prutyanov @ 2023-02-22 21:12 UTC (permalink / raw)
  To: annie.li, pbonzini, peter.maydell
  Cc: viktor.prutyanov, yuri.benditovich, yan, qemu-devel, viktor

Move out PE directory search functionality to be reused not only
for Debug Directory processing but for arbitrary PE directory.

Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
---
 contrib/elf2dmp/main.c | 71 +++++++++++++++++++++++++-----------------
 1 file changed, 42 insertions(+), 29 deletions(-)

diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index 9224764239..2f6028d8eb 100644
--- a/contrib/elf2dmp/main.c
+++ b/contrib/elf2dmp/main.c
@@ -333,6 +333,45 @@ static int fill_context(KDDEBUGGER_DATA64 *kdbg,
     return 0;
 }
 
+static int pe_get_data_dir_entry(uint64_t base, void *start_addr, int idx,
+        void *entry, size_t size, struct va_space *vs)
+{
+    const char e_magic[2] = "MZ";
+    const char Signature[4] = "PE\0\0";
+    IMAGE_DOS_HEADER *dos_hdr = start_addr;
+    IMAGE_NT_HEADERS64 nt_hdrs;
+    IMAGE_FILE_HEADER *file_hdr = &nt_hdrs.FileHeader;
+    IMAGE_OPTIONAL_HEADER64 *opt_hdr = &nt_hdrs.OptionalHeader;
+    IMAGE_DATA_DIRECTORY *data_dir = nt_hdrs.OptionalHeader.DataDirectory;
+
+    QEMU_BUILD_BUG_ON(sizeof(*dos_hdr) >= ELF2DMP_PAGE_SIZE);
+
+    if (memcmp(&dos_hdr->e_magic, e_magic, sizeof(e_magic))) {
+        return 1;
+    }
+
+    if (va_space_rw(vs, base + dos_hdr->e_lfanew,
+                &nt_hdrs, sizeof(nt_hdrs), 0)) {
+        return 1;
+    }
+
+    if (memcmp(&nt_hdrs.Signature, Signature, sizeof(Signature)) ||
+            file_hdr->Machine != 0x8664 || opt_hdr->Magic != 0x020b) {
+        return 1;
+    }
+
+    if (va_space_rw(vs,
+                base + data_dir[idx].VirtualAddress,
+                entry, size, 0)) {
+        return 1;
+    }
+
+    printf("Data directory entry #%d: RVA = 0x%08"PRIx32"\n", idx,
+            (uint32_t)data_dir[idx].VirtualAddress);
+
+    return 0;
+}
+
 static int write_dump(struct pa_space *ps,
         WinDumpHeader64 *hdr, const char *name)
 {
@@ -369,42 +408,16 @@ static int write_dump(struct pa_space *ps,
 static int pe_get_pdb_symstore_hash(uint64_t base, void *start_addr,
         char *hash, struct va_space *vs)
 {
-    const char e_magic[2] = "MZ";
-    const char Signature[4] = "PE\0\0";
     const char sign_rsds[4] = "RSDS";
-    IMAGE_DOS_HEADER *dos_hdr = start_addr;
-    IMAGE_NT_HEADERS64 nt_hdrs;
-    IMAGE_FILE_HEADER *file_hdr = &nt_hdrs.FileHeader;
-    IMAGE_OPTIONAL_HEADER64 *opt_hdr = &nt_hdrs.OptionalHeader;
-    IMAGE_DATA_DIRECTORY *data_dir = nt_hdrs.OptionalHeader.DataDirectory;
     IMAGE_DEBUG_DIRECTORY debug_dir;
     OMFSignatureRSDS rsds;
     char *pdb_name;
     size_t pdb_name_sz;
     size_t i;
 
-    QEMU_BUILD_BUG_ON(sizeof(*dos_hdr) >= ELF2DMP_PAGE_SIZE);
-
-    if (memcmp(&dos_hdr->e_magic, e_magic, sizeof(e_magic))) {
-        return 1;
-    }
-
-    if (va_space_rw(vs, base + dos_hdr->e_lfanew,
-                &nt_hdrs, sizeof(nt_hdrs), 0)) {
-        return 1;
-    }
-
-    if (memcmp(&nt_hdrs.Signature, Signature, sizeof(Signature)) ||
-            file_hdr->Machine != 0x8664 || opt_hdr->Magic != 0x020b) {
-        return 1;
-    }
-
-    printf("Debug Directory RVA = 0x%08"PRIx32"\n",
-            (uint32_t)data_dir[IMAGE_FILE_DEBUG_DIRECTORY].VirtualAddress);
-
-    if (va_space_rw(vs,
-                base + data_dir[IMAGE_FILE_DEBUG_DIRECTORY].VirtualAddress,
-                &debug_dir, sizeof(debug_dir), 0)) {
+    if (pe_get_data_dir_entry(base, start_addr, IMAGE_FILE_DEBUG_DIRECTORY,
+                &debug_dir, sizeof(debug_dir), vs)) {
+        eprintf("Failed to get Debug Directory\n");
         return 1;
     }
 
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support
  2023-02-22 21:12 [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support Viktor Prutyanov
  2023-02-22 21:12 ` [PATCH v2 1/3] contrib/elf2dmp: fix code style Viktor Prutyanov
  2023-02-22 21:12 ` [PATCH v2 2/3] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry Viktor Prutyanov
@ 2023-02-22 21:12 ` Viktor Prutyanov
  2023-03-06 21:35 ` [PATCH v2 0/3] contrib/elf2dmp: " Annie.li
  2023-03-16 16:48 ` Viktor Prutyanov
  4 siblings, 0 replies; 8+ messages in thread
From: Viktor Prutyanov @ 2023-02-22 21:12 UTC (permalink / raw)
  To: annie.li, pbonzini, peter.maydell
  Cc: viktor.prutyanov, yuri.benditovich, yan, qemu-devel, viktor

Since its inception elf2dmp has checked MZ signatures within an
address space above IDT[0] interrupt vector and took first PE image
found as Windows Kernel.
But in Windows Server 2022 memory dump this address space range is
full of invalid PE fragments and the tool must check that PE image
is 'ntoskrnl.exe' actually.
So, introduce additional validation by checking image name from
Export Directory against 'ntoskrnl.exe'.

Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
Tested-by: Yuri Benditovich <yuri.benditovich@daynix.com>
---
 contrib/elf2dmp/main.c | 28 ++++++++++++++++++++++++++--
 contrib/elf2dmp/pe.h   | 15 +++++++++++++++
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index 2f6028d8eb..89f0c69ab0 100644
--- a/contrib/elf2dmp/main.c
+++ b/contrib/elf2dmp/main.c
@@ -17,6 +17,7 @@
 
 #define SYM_URL_BASE    "https://msdl.microsoft.com/download/symbols/"
 #define PDB_NAME    "ntkrnlmp.pdb"
+#define PE_NAME     "ntoskrnl.exe"
 
 #define INITIAL_MXCSR   0x1f80
 
@@ -405,6 +406,25 @@ static int write_dump(struct pa_space *ps,
     return fclose(dmp_file);
 }
 
+static bool pe_check_export_name(uint64_t base, void *start_addr,
+        struct va_space *vs)
+{
+    IMAGE_EXPORT_DIRECTORY export_dir;
+    const char *pe_name;
+
+    if (pe_get_data_dir_entry(base, start_addr, IMAGE_FILE_EXPORT_DIRECTORY,
+                &export_dir, sizeof(export_dir), vs)) {
+        return false;
+    }
+
+    pe_name = va_space_resolve(vs, base + export_dir.Name);
+    if (!pe_name) {
+        return false;
+    }
+
+    return !strcmp(pe_name, PE_NAME);
+}
+
 static int pe_get_pdb_symstore_hash(uint64_t base, void *start_addr,
         char *hash, struct va_space *vs)
 {
@@ -489,6 +509,7 @@ int main(int argc, char *argv[])
     uint64_t KdDebuggerDataBlock;
     KDDEBUGGER_DATA64 *kdbg;
     uint64_t KdVersionBlock;
+    bool kernel_found = false;
 
     if (argc != 3) {
         eprintf("usage:\n\t%s elf_file dmp_file\n", argv[0]);
@@ -536,11 +557,14 @@ int main(int argc, char *argv[])
         }
 
         if (*(uint16_t *)nt_start_addr == 0x5a4d) { /* MZ */
-            break;
+            if (pe_check_export_name(KernBase, nt_start_addr, &vs)) {
+                kernel_found = true;
+                break;
+            }
         }
     }
 
-    if (!nt_start_addr) {
+    if (!kernel_found) {
         eprintf("Failed to find NT kernel image\n");
         err = 1;
         goto out_ps;
diff --git a/contrib/elf2dmp/pe.h b/contrib/elf2dmp/pe.h
index 807d006364..71126af1ac 100644
--- a/contrib/elf2dmp/pe.h
+++ b/contrib/elf2dmp/pe.h
@@ -88,6 +88,20 @@ typedef struct IMAGE_NT_HEADERS64 {
     IMAGE_OPTIONAL_HEADER64 OptionalHeader;
 } __attribute__ ((packed)) IMAGE_NT_HEADERS64;
 
+typedef struct IMAGE_EXPORT_DIRECTORY {
+    uint32_t    Characteristics;
+    uint32_t    TimeDateStamp;
+    uint16_t    MajorVersion;
+    uint16_t    MinorVersion;
+    uint32_t    Name;
+    uint32_t    Base;
+    uint32_t    NumberOfFunctions;
+    uint32_t    NumberOfNames;
+    uint32_t    AddressOfFunctions;
+    uint32_t    AddressOfNames;
+    uint32_t    AddressOfNameOrdinals;
+} __attribute__ ((packed)) IMAGE_EXPORT_DIRECTORY;
+
 typedef struct IMAGE_DEBUG_DIRECTORY {
     uint32_t Characteristics;
     uint32_t TimeDateStamp;
@@ -102,6 +116,7 @@ typedef struct IMAGE_DEBUG_DIRECTORY {
 #define IMAGE_DEBUG_TYPE_CODEVIEW   2
 #endif
 
+#define IMAGE_FILE_EXPORT_DIRECTORY 0
 #define IMAGE_FILE_DEBUG_DIRECTORY  6
 
 typedef struct guid_t {
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support
  2023-02-22 21:12 [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support Viktor Prutyanov
                   ` (2 preceding siblings ...)
  2023-02-22 21:12 ` [PATCH v2 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support Viktor Prutyanov
@ 2023-03-06 21:35 ` Annie.li
  2023-03-16 16:48 ` Viktor Prutyanov
  4 siblings, 0 replies; 8+ messages in thread
From: Annie.li @ 2023-03-06 21:35 UTC (permalink / raw)
  To: Viktor Prutyanov, pbonzini, peter.maydell
  Cc: viktor.prutyanov, yuri.benditovich, yan, qemu-devel

Hello Viktor,

This patch set looks good to me, thank you!

On 2/22/2023 4:12 PM, Viktor Prutyanov wrote:
> 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
Reviewed-by: Annie Li <annie.li@oracle.com>

Thanks

Annie

>
> 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(-)
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support
  2023-02-22 21:12 [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support Viktor Prutyanov
                   ` (3 preceding siblings ...)
  2023-03-06 21:35 ` [PATCH v2 0/3] contrib/elf2dmp: " Annie.li
@ 2023-03-16 16:48 ` Viktor Prutyanov
  2023-03-17 13:45   ` Peter Maydell
  4 siblings, 1 reply; 8+ messages in thread
From: Viktor Prutyanov @ 2023-03-16 16:48 UTC (permalink / raw)
  To: peter.maydell
  Cc: pbonzini, yuri.benditovich, yan, viktor, annie.li, qemu-devel



> 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(-)
> 
> --
> 2.35.1

Hi Peter,

As we discussed, I would like to ask you to pick up this series.

Thanks,
Viktor Prutyanov


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support
  2023-03-16 16:48 ` Viktor Prutyanov
@ 2023-03-17 13:45   ` Peter Maydell
  2023-03-17 15:21     ` Viktor Prutyanov
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2023-03-17 13:45 UTC (permalink / raw)
  To: Viktor Prutyanov
  Cc: pbonzini, yuri.benditovich, yan, viktor, annie.li, qemu-devel

On Thu, 16 Mar 2023 at 16:48, Viktor Prutyanov
<viktor.prutyanov@phystech.edu> wrote:
>
>
>
> > 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(-)
> >
> > --
> > 2.35.1
>
> Hi Peter,
>
> As we discussed, I would like to ask you to pick up this series.

Sure, I can put this into the target-arm pullreq I'm doing,
unless anybody prefers them to go into the tree via a
different route.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re:[PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support
  2023-03-17 13:45   ` Peter Maydell
@ 2023-03-17 15:21     ` Viktor Prutyanov
  0 siblings, 0 replies; 8+ messages in thread
From: Viktor Prutyanov @ 2023-03-17 15:21 UTC (permalink / raw)
  To: Peter Maydell
  Cc: pbonzini, yuri.benditovich, yan, viktor, annie.li, qemu-devel

Thank you! Personally, I agree with any way to get the elf2dmp patch series into the tree.
 
Best regards,
Viktor Prutyanov


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-17 15:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 21:12 [PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support Viktor Prutyanov
2023-02-22 21:12 ` [PATCH v2 1/3] contrib/elf2dmp: fix code style Viktor Prutyanov
2023-02-22 21:12 ` [PATCH v2 2/3] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry Viktor Prutyanov
2023-02-22 21:12 ` [PATCH v2 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support Viktor Prutyanov
2023-03-06 21:35 ` [PATCH v2 0/3] contrib/elf2dmp: " Annie.li
2023-03-16 16:48 ` Viktor Prutyanov
2023-03-17 13:45   ` Peter Maydell
2023-03-17 15:21     ` Viktor Prutyanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.