Blame SOURCES/kvm-dump-Reintroduce-memory_offset-and-section_offset.patch

97168e
From 6932fe3afbec443bbf6acff5b707536254e1bc37 Mon Sep 17 00:00:00 2001
97168e
From: Janosch Frank <frankja@linux.ibm.com>
97168e
Date: Mon, 17 Oct 2022 08:38:16 +0000
97168e
Subject: [PATCH 35/42] dump: Reintroduce memory_offset and section_offset
97168e
MIME-Version: 1.0
97168e
Content-Type: text/plain; charset=UTF-8
97168e
Content-Transfer-Encoding: 8bit
97168e
97168e
RH-Author: Cédric Le Goater <clg@redhat.com>
97168e
RH-MergeRequest: 226: s390: Enhanced Interpretation for PCI Functions and Secure Execution guest dump
97168e
RH-Bugzilla: 1664378 2043909
97168e
RH-Acked-by: Thomas Huth <thuth@redhat.com>
97168e
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
97168e
RH-Acked-by: Jon Maloy <jmaloy@redhat.com>
97168e
RH-Commit: [35/41] e60c0d066aeeedb42e724712bc3aa7b7591c6c79
97168e
97168e
section_offset will later be used to store the offset to the section
97168e
data which will be stored last. For now memory_offset is only needed
97168e
to make section_offset look nicer.
97168e
97168e
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
97168e
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
97168e
Message-Id: <20221017083822.43118-5-frankja@linux.ibm.com>
97168e
(cherry picked from commit 13fd417ddc81a1685c6a8f4e1c80bbfe7150f164)
97168e
Signed-off-by: Cédric Le Goater <clg@redhat.com>
97168e
---
97168e
 dump/dump.c | 2 ++
97168e
 1 file changed, 2 insertions(+)
97168e
97168e
diff --git a/dump/dump.c b/dump/dump.c
97168e
index d17537d4e9..7a42401790 100644
97168e
--- a/dump/dump.c
97168e
+++ b/dump/dump.c
97168e
@@ -1885,6 +1885,8 @@ static void dump_init(DumpState *s, int fd, bool has_format,
97168e
         s->phdr_offset = s->shdr_offset + sizeof(Elf32_Shdr) * s->shdr_num;
97168e
         s->note_offset = s->phdr_offset + sizeof(Elf32_Phdr) * s->phdr_num;
97168e
     }
97168e
+    s->memory_offset = s->note_offset + s->note_size;
97168e
+    s->section_offset = s->memory_offset + s->total_size;
97168e
 
97168e
     return;
97168e
 
97168e
-- 
97168e
2.37.3
97168e