All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Bonzini, Paolo" <pbonzini@redhat.com>,
	mhartmay@linux.ibm.com,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	imbrenda@linux.ibm.com, Halil Pasic <pasic@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>, Thomas Huth <thuth@redhat.com>,
	"open list:S390 SCLP-backed..." <qemu-s390x@nongnu.org>,
	"Henderson, Richard" <richard.henderson@linaro.org>
Subject: Re: [PATCH v2 03/11] dump: Split write of section headers and data and add a prepare step
Date: Thu, 14 Jul 2022 13:45:26 +0200	[thread overview]
Message-ID: <1a3daf50-8b35-57f5-943e-c62039e66da9@linux.ibm.com> (raw)
In-Reply-To: <CAMxuvazSob1cgGiY8euW6Cq4_f37VZhLxjF6PK7kixVFnHukpA@mail.gmail.com>

On 7/13/22 17:31, Marc-André Lureau wrote:
> Hi
> 
> On Wed, Jul 13, 2022 at 5:07 PM Janosch Frank <frankja@linux.ibm.com> wrote:
>>
>> By splitting the writing of the section headers and (future) section
>> data we prepare for the addition of a string table section and
>> architecture sections.
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>> ---

[...]

>> @@ -557,12 +600,22 @@ static void dump_begin(DumpState *s, Error **errp)
>>       /* Write elf header to buffer */
>>       prepare_elf_header(s);
>>
>> +    prepare_elf_sections(s, errp);
>> +    if (*errp) {
>> +        return;
>> +    }
>> +
>>       /* Start to write stuff into files*/
>>       write_elf_header(s, errp);
>>       if (*errp) {
>>           return;
>>       }
>>
>> +    write_elf_section_headers(s, errp);
> 
> Why do you reorder the sections? Could you explain in the commit
> message why? Is this is format compliant? and update the comment
> above? thanks


Having the section data at the end of the file is unfortunately a s390 
PV requirement since we can only grab the encrypted page tweaks and 
counts *after* all of the memory has been encrypted.

The sections are the most obvious way to add such data to the file since 
they are basically unused right now and we're able to write a string 
table at the very end after everyone registered their strings.

All of this is ELF compliant AFAIK, that's why elf specifies offsets of 
the headers and the data. From what I see only the main elf header needs 
to start at offset 0.

  reply	other threads:[~2022-07-14 11:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 13:03 [PATCH v2 00/11] dump: Add arch section and s390x PV dump Janosch Frank
2022-07-13 13:03 ` [PATCH v2 01/11] dump: Cleanup memblock usage Janosch Frank
2022-07-13 15:09   ` Marc-André Lureau
2022-07-13 15:30     ` Janosch Frank
2022-07-13 15:35       ` Marc-André Lureau
2022-07-14  9:40         ` Janosch Frank
2022-07-15  8:34           ` Marc-André Lureau
2022-07-13 13:03 ` [PATCH v2 02/11] dump: Allocate header Janosch Frank
2022-07-13 15:20   ` Marc-André Lureau
2022-07-13 13:03 ` [PATCH v2 03/11] dump: Split write of section headers and data and add a prepare step Janosch Frank
2022-07-13 15:31   ` Marc-André Lureau
2022-07-14 11:45     ` Janosch Frank [this message]
2022-07-13 13:03 ` [PATCH v2 04/11] dump: Reorder struct DumpState Janosch Frank
2022-07-13 15:46   ` Marc-André Lureau
2022-07-13 13:03 ` [PATCH v2 05/11] dump/dump: Add section string table support Janosch Frank
2022-07-13 15:58   ` Marc-André Lureau
2022-07-14 11:53     ` Janosch Frank
2022-07-14 11:55       ` Marc-André Lureau
2022-07-13 13:03 ` [PATCH v2 06/11] dump/dump: Add arch section support Janosch Frank
2022-07-13 16:02   ` Marc-André Lureau
2022-07-13 13:03 ` [PATCH v2 07/11] linux header sync Janosch Frank
2022-07-13 16:03   ` Marc-André Lureau
2022-07-13 13:03 ` [PATCH v2 08/11] s390x: Add protected dump cap Janosch Frank
2022-07-13 13:03 ` [PATCH v2 09/11] s390x: Introduce PV query interface Janosch Frank
2022-07-15  8:10   ` Marc-André Lureau
2022-07-15  8:18     ` Janosch Frank
2022-07-15  8:23       ` Marc-André Lureau
2022-07-13 13:03 ` [PATCH v2 10/11] s390x: Add KVM PV dump interface Janosch Frank
2022-07-13 13:03 ` [PATCH v2 11/11] s390x: pv: Add dump support Janosch Frank

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=1a3daf50-8b35-57f5-943e-c62039e66da9@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mhartmay@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --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 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.