public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] elf: Add elf checks for main executable
Date: Tue, 14 Dec 2021 11:03:07 -0800	[thread overview]
Message-ID: <20211214190307.6bt5cvmburgbheat@google.com> (raw)
In-Reply-To: <87h7bbsfxs.fsf@oldenburg.str.redhat.com>

On 2021-12-14, Florian Weimer wrote:
>* Fāng-ruì Sòng:
>
>> On Tue, Dec 14, 2021 at 1:03 AM Florian Weimer <fweimer@redhat.com> wrote:
>>>
>>> * Fāng-ruì Sòng:
>>>
>>> > If the question is: "if upstream glibc implements the diagnostic, will
>>> > ChromeOS port the patch to their glibc".  My reply is non-authoritative,
>>> > but if this has not been a problem for more than 3 years now, I do know
>>> > see large value backporting the feature to their older glibc release.
>>>
>>> But if you don't backport, you can teach your toolchain to start
>>> producing binaries that fail to load on older glibc.  You will have to
>>> keep creating binaries that lack proper markup.
>>>
>>> My concern is that we go through all this trouble to implement a version
>>> proper handshake, and yet Google binaries will still crash on older
>>> glibc.
>>
>> 3+ years ago, "still crash on older glibc" was considered an
>> acceptable compromise as the scenario (cared by some upstream glibc
>> folks) is simply unsupported (and by many other groups).
>>
>> Now after 3 years, (while this is unsupported) back porting RELR
>> executables to less-than-3 year old ChromeOS would still work because
>> all glibc releases in the past 3 years support RELR. If you consider
>> symbol versioning, many symbols get new symbols which won't run on
>> 3-year-old glibc anyway.
>
>I have a feeling we are talking past each other.

I think it is just a fundamental difference in our viewpoints:

* I share the feeling with Android, ChromeOS, FreeBSD, Fuchsia, NetBSD, and
   Solaris): the "time travel compatibility" development model is simply
   unsupported and as a compromise poor diagnostics are acceptable.
   (For some groups "unsupported" means "cannot run" with other lockout
   mechanism.)
   The Gentoo Linux developer leans on this side.
   An Void Linux developer and an Arch Linux developer seem to lean on this side, too.
   (They just did not participate the discussion.)

* You and HJ really want a diagnostic for "time travel compatibility",
   even if RELR will remain non-default knob in majority Linux world for
   a long time.

The two camps generally don't interact, but here for the glibc RELR
patch ("Can DT_RELR catch up glibc 2.35?") we interact.

>Based on previous mail exchanges, I think you would use an lld option to
>build binaries which use DT_RELR but do not have any version lockout for
>older glibc (so that these binaries still work on your older glibc with
>DT_RELR).

Perhaps I am not clear about the question. Let me rephrase:
ld.lld --pack-dyn-relocs=relr will remain the current semantics.
It won't add version symbol/bump ABIVERSION to NOT run on older glibc.

Even if a glibc mechanism is developed, it likely has low/no adoption in the first
camp since (1) back porting requires some efforts (2) the mechanism solves a subset
of problems. And mostly importantly, the first camp people don't
consider this a problem.

  reply	other threads:[~2021-12-14 19:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 15:03 Adhemerval Zanella
2021-11-19 15:33 ` H.J. Lu
2021-11-19 16:05   ` H.J. Lu
2021-11-19 17:06     ` Adhemerval Zanella
2021-12-06 19:03 ` H.J. Lu
2021-12-06 19:09 ` Florian Weimer
2021-12-06 19:22   ` H.J. Lu
2021-12-06 20:31     ` Adhemerval Zanella
2021-12-06 20:37       ` Florian Weimer
2021-12-06 21:07         ` Adhemerval Zanella
2021-12-07 15:45           ` Florian Weimer
2021-12-07 17:35             ` Adhemerval Zanella
2021-12-08  0:01               ` Fāng-ruì Sòng
2021-12-08 10:19                 ` Florian Weimer
2021-12-14  0:17                   ` Fāng-ruì Sòng
2021-12-14  9:03                     ` Florian Weimer
2021-12-14  9:09                       ` Fāng-ruì Sòng
2021-12-14  9:18                         ` Florian Weimer
2021-12-14 19:03                           ` Fangrui Song [this message]
2021-12-14 12:28                         ` Adhemerval Zanella
2021-12-14 12:23                       ` Adhemerval Zanella
2021-12-14 19:24                         ` Fangrui Song
2021-12-14 21:07                           ` Adhemerval Zanella
2021-12-14 21:30                             ` Fangrui Song
2021-12-14 21:53                               ` Florian Weimer
2021-12-14 23:08                                 ` Fangrui Song

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=20211214190307.6bt5cvmburgbheat@google.com \
    --to=maskray@google.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).