From: ebiederm@xmission•com (Eric W. Biederman)
To: Baoquan He <bhe@redhat•com>
Cc: Thiago Jung Bauermann <bauerman@linux•vnet.ibm.com>,
kexec@lists•infradead.org, linuxppc-dev@lists•ozlabs.org,
Michael Ellerman <mpe@ellerman•id.au>,
Dave Young <dyoung@redhat•com>, Vivek Goyal <vgoyal@redhat•com>
Subject: Re: [RFC] kexec_file: Add support for purgatory built as PIE
Date: Fri, 04 Nov 2016 10:13:39 -0500 [thread overview]
Message-ID: <871syrcm70.fsf@xmission.com> (raw)
In-Reply-To: <20161104073840.GD4314@x1> (Baoquan He's message of "Fri, 4 Nov 2016 15:38:40 +0800")
Baoquan He <bhe@redhat•com> writes:
> On 11/02/16 at 04:00am, Thiago Jung Bauermann wrote:
>> Hello,
>>
>> The kexec_file code currently builds the purgatory as a partially linked object
>> (using ld -r). Is there a particular reason to use that instead of a position
>> independent executable (PIE)?
>
> It's taken as "-r", relocatable in user space kexec-tools too originally.
> I think Vivek just keeps it the same when moving into kernel.
At least on x86 using just -r removed the need for a GOT and all of the
other nasty dynamic relocatable bits, that are not needed when the you
don't want to share your text bits with the page cache.
I can see reaons for refactoring code but I expect PIE expecutables need
a GOT and all of that pain in the neck stuff that can just be avoided by
building the code to run at an absolute address.
So far I have not seen ELF relocations that are difficult to process.
Eric
next prev parent reply other threads:[~2016-11-04 15:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 6:00 [RFC] kexec_file: Add support for purgatory built as PIE Thiago Jung Bauermann
2016-11-04 7:38 ` Baoquan He
2016-11-04 15:13 ` Eric W. Biederman [this message]
2016-11-04 19:19 ` Thiago Jung Bauermann
2016-11-04 15:43 ` Thiago Jung Bauermann
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=871syrcm70.fsf@xmission.com \
--to=ebiederm@xmission$(echo .)com \
--cc=bauerman@linux$(echo .)vnet.ibm.com \
--cc=bhe@redhat$(echo .)com \
--cc=dyoung@redhat$(echo .)com \
--cc=kexec@lists$(echo .)infradead.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mpe@ellerman$(echo .)id.au \
--cc=vgoyal@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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