public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Fangrui Song via Libc-alpha <libc-alpha@sourceware.org>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
	 Fangrui Song <maskray@google.com>, Rich Felker <dalias@libc.org>
Subject: Re: Can DT_RELR catch up glibc 2.35?
Date: Thu, 18 Nov 2021 10:45:47 +0100	[thread overview]
Message-ID: <87pmqxztis.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20211118003025.6pq5jucukbgrw7zg@google.com> (Fangrui Song via Libc-alpha's message of "Wed, 17 Nov 2021 16:30:25 -0800")

* Fangrui Song via Libc-alpha:

> A synthesized versioned undefined dynamic symbol can indeed catch "time
> travel compatibility", but the mechanism would be the first time ld adds an option variant
> for a particular libc implementation (glibc) locking out all other
> implementations: --pack-dyn-relocs=relr-glibc or -z relr-glibc.
> Sigh, it is really not pretty.

There are already other features that do not work with other libcs,
e.g. --audit, --filter, --auxiliary.  And --dynamic-linker tends to lock
out other libcs, too.  And it's a bit hard to argue against this given
that --pack-dyn-relocs=relr works the same way against upstream glibc.

However, I happen to dislike the glibc-tied approach as well, and would
like to see an ELFOSABI bump, along with a kernel fix to make it stick
for main programs as well.

> We know many other libc implementations don't want to synthesize such a
> symbol.

It's been used for other toolchain features before, that's where the
idea comes from.

> "If user is deploying a *opt-in* feature that requires proper dynamic
> loader support, I would expect they know the environment they are targeting."
>
> May I suggest that: if a glibc distro really worries that users deploy
> ld.lld --pack-dyn-relocs=relr on their new system and back port that to
> old systems, just remove DT_RELR support from your local glibc? Since
> ld.lld --pack-dyn-relocs=relr  doesn't work on your system with glibc
> 2.35, people wouldn't complain about not working on older versions.

In a sense, isn't that what's happening?  Albeit on an upstream scale.

Thanks,
Florian


  reply	other threads:[~2021-11-18  9:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12  7:47 Fangrui Song
2021-11-16 21:07 ` Adhemerval Zanella
2021-11-17  0:26   ` H.J. Lu
2021-11-17 12:46     ` Adhemerval Zanella
2021-11-17 13:14       ` H.J. Lu
2021-11-18  0:30         ` Fangrui Song
2021-11-18  9:45           ` Florian Weimer [this message]
2021-11-18 23:27             ` Fangrui Song
2021-11-19 11:51               ` Adhemerval Zanella
2021-11-24  1:10               ` Sam James
2021-11-19 19:18           ` Rich Felker
2021-11-17 22:12   ` Florian Weimer
2021-11-18 12:45     ` Adhemerval Zanella

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=87pmqxztis.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=dalias@libc.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=maskray@google.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 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).