All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: robert.berger.yocto.user@gmail.com
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>,
	 Mark Hatle <mark.hatle@kernel.crashing.org>,
	poky@lists.yoctoproject.org,
	 Yocto-mailing-list <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] [poky] [PATCH] local.conf.sample: disable prelink
Date: Thu, 22 Jul 2021 21:05:14 +0200	[thread overview]
Message-ID: <CANNYZj-C_QWe9CB9JsAOctCJbNrAni8WoDVg15t5kzKsYn6QEw@mail.gmail.com> (raw)
In-Reply-To: <a7e0a44c-084e-5e21-5621-67e32ca36127@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2153 bytes --]

PIE is nowadays more or less the only available option and is expected for
improved security; Yocto does not even test non-PIE builds or provide an
off the shelf way to turn it off.

I also have to note that prelink does show higher RAM consumption in your
tests as well (MemFree column). On the constrained systems which would
benefit most from improved prelink timings that might be a bigger loss than
not prelinking.

But yes, there is a timing benefit visible in the tests: 0.01s vs 0.1s.

Alex

On Mon, 19 Jul 2021 at 22:58, Robert Berger@yocto.user <
robert.berger.yocto.user@gmail.com> wrote:

> Hi Alex, RP, Mark,
>
> I did some research on the subject in order to try to figure out what is
> going on.
>
> 1) I come to a similar conclusion with what found, but tried to look a
> bit deeper for the reason.
>
> 1.1) The reason that cross-prelink is not prelinking is, that for a
> quite some time by default everything is built with PIE mode by default
> and cross-prelink does not seem to be able to work on exe/libs compiled
> with PIE mode. So seeing the same behavior with and without prelinking
> is what I would expect as long as everything is compiled with PIE mode.
>
> A more detailed analysis of my tests can be found on my not yet
> officially published site:
>
> https://rlbl.me/prelink-1
>
> https://rlbl.me/prelink-2
>
> Alex:
>
> Can you please rebuild your test images without PIE mode and re-run the
> tests?
>
> Then we should have the 4 test cases:
>
> prelinked-with-pie
> no-prelink-with-pie
> prelink-no-pie
> no-prelink-no-pie
>
> I guess then we can discuss what are the next steps.
>
> In my opinion the current default settings, which compile close to
> everything in PIE mode, but invoke also cross-prelink do not make much
> sense.
>
> The question is: "Do we want to drop cross-prelink, or do we want to
> drag it along and come up more fine-grained configuration options?"
>
> We could e.g. exclude certain files from pre-linking.
>
> IMHO cross-prelink still works, but not on exe/libs which were compiled
> in PIE mode.
>
> Regards,
>
> Robert
>

[-- Attachment #2: Type: text/html, Size: 2803 bytes --]

  reply	other threads:[~2021-07-22 19:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  8:12 [PATCH] local.conf.sample: disable prelink Alexander Kanavin
2021-06-15  8:48 ` [poky] " Richard Purdie
2021-06-15  8:55   ` Alexander Kanavin
2021-06-15  9:04     ` Richard Purdie
2021-06-15 15:21     ` Alexander Kanavin
2021-06-15 17:38       ` [yocto] " Khem Raj
2021-06-16  9:11       ` Richard Purdie
2021-06-16  9:45         ` Alexander Kanavin
2021-07-19 20:58           ` [yocto] " Robert Berger
2021-07-22 19:05             ` Alexander Kanavin [this message]
2021-07-23 12:51               ` Robert Berger
2021-06-15 17:21 ` Khem Raj

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=CANNYZj-C_QWe9CB9JsAOctCJbNrAni8WoDVg15t5kzKsYn6QEw@mail.gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=mark.hatle@kernel.crashing.org \
    --cc=poky@lists.yoctoproject.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=robert.berger.yocto.user@gmail.com \
    --cc=yocto@lists.yoctoproject.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.