All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: Prelink problems -- need help!
Date: Mon, 26 Oct 2015 19:40:52 -0500	[thread overview]
Message-ID: <562EC814.4080508@windriver.com> (raw)
In-Reply-To: <562E58BE.9060003@windriver.com>

On 10/26/15 11:45 AM, Mark Hatle wrote:
> On 10/26/15 11:10 AM, Phil Blundell wrote:
>> [Cc list trimmed]
>>
>> On Mon, 2015-10-26 at 09:28 -0500, Mark Hatle wrote:
>>> As you can see, pretty much everything is currently broken and I'm
>>> struggling to
>>> find community people with the right skill sets to help me resolve
>>> the issues.
>>
>> I think it's true that prelink is a technology which has largely had
>> its day, and I could well imagine that upstream Red Hat is no longer
>> very interested in it.  https://fedorahosted.org/fesco/ticket/1183 has
>> a summary of some of the reasons why.
>>
>> Before investing any significant amount of time in fixing up prelink
>> (and from what you've described it sounds like it might indeed be a
>> significant effort to get it working again on all platforms) it might
>> be a good idea to make sure we are still convinced that prelink
>> provides useful and meaningful benefits for OE-core users.
>>
> 
> I do think prelink has a purpose.  Especially for embedded systems.
> 
> The biggest reason I see against prelink is ASLR.  I agree 100% that if you want
> ASLR (Address Randomization) you should not be using the prelinker.
> 
> Usually secondary reasons include if you are doing field upgrades at a package
> level -- it means you also need the ability to prelink on the device which cause
> have other performance ramifications and such during this upgrade process.
> 
> I agree with some of the information on the Fedora hosted link you pointed to,
> but disagree with others.
> 
> While some of the modern hashing techniques and such do improve run-time dynamic
> link performance, there is still a hit that we must take.  For devices that need
> quick boot times, quick startup, or are memory constrained, the prelinker can
> still help.  (Memory usage on very small systems is a good example.  Memory
> usage can be reduced in larger applications by reducing the number of
> Copy-on-write pages required to handle the relocation information.)
> 
> I probably would not use the prelinker on a workstation/server any longer.  I
> might not use it on a 'larger' embedded system, but on a more traditional
> embedded system I do think it still has merit.
> 
> (Probably a discussion for the future, due to the ASLR, is should the prelinker
> be enabled by default -- even if it works -- but that is a discussion for later.)
> 
>> If the answer to that is yes then I probably could spare a bit of time
>> to look at the ARM and MIPS issues at least.
> 
> I can certainly use any help you have.  I have someone looking into the ARM
> issues with me.  It APPEARS the primary behavior there has to do with IFUNC
> behavior to things like memcpy has changed, causing the prelinker to do the
> wrong thing(s).  But I have few additional details at this time.
> 
> I've reached out to parts of the MIPS community for help, but we'll see if I get
> any type of response.  (MIPS, especially 32-bit, I'm very surprised has broken
> recently.  I haven't seen many changes in regard to the way binaries are loaded
> on MIPS -- so the issue must be related to a more fundamental optimization or
> bug in the prelink.)
> 
> Thanks for the offer, let me know if you find anything.  I'll certainly respond
> as I make progress trying to go through the issues.

I just wanted to update folks on where I'm at.

On the Intel IA32 architecture, the problem appears to have been triggered by
the ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA that went in after March of this year.
 I've not been able to track down what is causing the bad behavior -- but fully
dropping support for that class type allows the prelink to "mostly work".

On ARM the issues appear to have some problem related to IFUNCs, but I still
don't have any data beyond that at this point.

> --Mark
> 
>> p.
>>
> 



  parent reply	other threads:[~2015-10-27  0:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 14:28 Prelink problems -- need help! Mark Hatle
2015-10-26 16:10 ` Phil Blundell
2015-10-26 16:45   ` Mark Hatle
2015-10-26 16:50     ` Phil Blundell
2015-10-26 16:55       ` Mark Hatle
2015-10-26 21:18         ` Phil Blundell
2015-10-26 21:35           ` Mark Hatle
2015-10-29 18:32         ` Khem Raj
2015-10-29 18:41           ` Mark Hatle
2015-10-27  0:40     ` Mark Hatle [this message]
2015-10-30  3:50 ` Prelink status Mark Hatle

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=562EC814.4080508@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.