From: Marc Hartmayer <mhartmay@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, pbonzini@redhat.com,
borntraeger@linux.ibm.com, imbrenda@linux.ibm.com,
pasic@linux.ibm.com, cohuck@redhat.com, thuth@redhat.com,
qemu-s390x@nongnu.org, seiden@linux.ibm.com, scgl@linux.ibm.com
Subject: Re: [PATCH v6 02/10] dump: Write ELF section headers right after ELF header
Date: Mon, 17 Oct 2022 19:12:01 +0200 [thread overview]
Message-ID: <87a65ue5ni.fsf@linux.ibm.com> (raw)
In-Reply-To: <3a50cd3b-b130-a411-d89d-cd6e5eed7656@linux.ibm.com>
Janosch Frank <frankja@linux.ibm.com> writes:
> On 10/17/22 14:49, Marc Hartmayer wrote:
>> Janosch Frank <frankja@linux.ibm.com> writes:
>>
>>> Let's start bundling the writes of the headers and of the data so we
>>> have a clear ordering between them. Since the ELF header uses offsets
>>> to the headers we can freely order them.
>>>
>>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>>> ---
>>> dump/dump.c | 31 ++++++++++++++-----------------
>>> 1 file changed, 14 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/dump/dump.c b/dump/dump.c
>>> index e7a3b54ebe..b168a25321 100644
>>> --- a/dump/dump.c
>>> +++ b/dump/dump.c
>>> @@ -583,6 +583,8 @@ static void dump_begin(DumpState *s, Error **errp)
>>> * --------------
>>> * | elf header |
>>> * --------------
>>> + * | sctn_hdr |
>>> + * --------------
>>
>> While you’re at it, I would suggest to add the location for the program
>> headers (phdr) as well. This would it make easier to understand the
>> memory layout & the code below as well.
>>
>> I guess it looks like:
>>
>> …
>> ---------------
>> | sctn_hdr |
>> ---------------
>> | prog_hdr |
>> ---------------
>> …
>>
>>
>> […snip]
>>
>
>
> They are already in there, have a look at the PT_* entries. I've left
> them like this because I assumed that the original author wanted to make
> a point by having them like this.
Makes sense - I mistakenly assumed that these were the actual segment
contents.
[…snip]
next prev parent reply other threads:[~2022-10-17 17:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 8:38 [PATCH v6 00/10] dump: Add arch section and s390x PV dump Janosch Frank
2022-10-17 8:38 ` [PATCH v6 01/10] dump: Use a buffer for ELF section data and headers Janosch Frank
2022-10-17 9:45 ` Marc-André Lureau
2022-10-17 8:38 ` [PATCH v6 02/10] dump: Write ELF section headers right after ELF header Janosch Frank
2022-10-17 9:45 ` Marc-André Lureau
2022-10-17 12:49 ` Marc Hartmayer
2022-10-17 13:59 ` Janosch Frank
2022-10-17 17:12 ` Marc Hartmayer [this message]
2022-10-17 8:38 ` [PATCH v6 03/10] dump: Reorder struct DumpState Janosch Frank
2022-10-17 8:38 ` [PATCH v6 04/10] dump: Reintroduce memory_offset and section_offset Janosch Frank
2022-10-17 9:45 ` Marc-André Lureau
2022-10-17 8:38 ` [PATCH v6 05/10] dump: Add architecture section and section string table support Janosch Frank
2022-10-17 9:45 ` Marc-André Lureau
2022-10-17 11:32 ` [PATCH v7] " Janosch Frank
2022-10-17 8:38 ` [PATCH v6 06/10] s390x: Add protected dump cap Janosch Frank
2022-10-17 8:38 ` [PATCH v6 07/10] s390x: Introduce PV query interface Janosch Frank
2022-10-17 8:38 ` [PATCH v6 08/10] RFC: elf.h changes Janosch Frank
2022-10-21 12:28 ` Thomas Huth
2022-10-17 8:38 ` [PATCH v6 09/10] s390x: Add KVM PV dump interface Janosch Frank
2022-10-20 11:03 ` Steffen Eiden
2022-10-24 18:36 ` Marc-André Lureau
2022-10-25 7:27 ` Janosch Frank
2022-10-17 8:38 ` [PATCH v6 10/10] s390x: pv: Add dump support Janosch Frank
2022-10-20 11:03 ` Steffen Eiden
2022-10-21 12:31 ` [PATCH v6 00/10] dump: Add arch section and s390x PV dump Thomas Huth
2022-10-21 12:48 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a65ue5ni.fsf@linux.ibm.com \
--to=mhartmay@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=marcandre.lureau@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=scgl@linux.ibm.com \
--cc=seiden@linux.ibm.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).