* [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR
@ 2021-11-19 15:26 H.J. Lu
2021-11-19 15:30 ` Florian Weimer
0 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2021-11-19 15:26 UTC (permalink / raw)
To: libc-alpha; +Cc: Adhemerval Zanella, Florian Weimer
Executables with DT_RELR will crash mysteriously with glibc binaries
without DT_RELR support. Bump EI_ABIVERSION won't prevent crash since
the Linux kernel loader doesn't check EI_ABIVERSION on executables.
Adding a glibc version dependency on the first glibc version with
DT_RELR support will prevent backporting DT_RELR support to released
glibc branches.
Add a GLIBC_PRIVATE_RELR version as a proxy for DT_RELR support in glibc.
Linker should add the GLIBC_PRIVATE_RELR version dependency on binaries
with DT_RELR. GLIBC_PRIVATE_RELR should be backported together when
backporting DT_RELR support.
---
io/Versions | 4 +++-
scripts/abilist.awk | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/io/Versions b/io/Versions
index 4e19540885..629d458324 100644
--- a/io/Versions
+++ b/io/Versions
@@ -141,7 +141,6 @@ libc {
closefrom;
}
GLIBC_PRIVATE {
- __libc_fcntl64;
__fcntl_nocancel;
__open64_nocancel;
__write_nocancel;
@@ -151,4 +150,7 @@ libc {
__file_change_detection_for_fp;
__fstat64;
}
+ GLIBC_PRIVATE_RELR {
+ __libc_fcntl64;
+ }
}
diff --git a/scripts/abilist.awk b/scripts/abilist.awk
index 24a34ccbed..620aacb627 100644
--- a/scripts/abilist.awk
+++ b/scripts/abilist.awk
@@ -55,7 +55,7 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
# caused STV_HIDDEN symbols to appear in .dynsym, though that is useless.
if (NF > 7 && $7 == ".hidden") next;
- if (version == "GLIBC_PRIVATE" && !include_private) next;
+ if (version ~ /^GLIBC_PRIVATE/ && !include_private) next;
desc = "";
if (type == "D" && ($4 == ".tbss" || $4 == ".tdata")) {
--
2.33.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR
2021-11-19 15:26 [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR H.J. Lu
@ 2021-11-19 15:30 ` Florian Weimer
2021-11-19 15:36 ` H.J. Lu
0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2021-11-19 15:30 UTC (permalink / raw)
To: H.J. Lu; +Cc: libc-alpha, Adhemerval Zanella
* H. J. Lu:
> Executables with DT_RELR will crash mysteriously with glibc binaries
> without DT_RELR support. Bump EI_ABIVERSION won't prevent crash since
> the Linux kernel loader doesn't check EI_ABIVERSION on executables.
> Adding a glibc version dependency on the first glibc version with
> DT_RELR support will prevent backporting DT_RELR support to released
> glibc branches.
>
> Add a GLIBC_PRIVATE_RELR version as a proxy for DT_RELR support in glibc.
> Linker should add the GLIBC_PRIVATE_RELR version dependency on binaries
> with DT_RELR. GLIBC_PRIVATE_RELR should be backported together when
> backporting DT_RELR support.
I don't like it. What's wrong about EI_ABIVERSION?
The kernel doesn't need to check EI_ABIVERSION because it does not do
relocation processing.
Thanks,
Florian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR
2021-11-19 15:30 ` Florian Weimer
@ 2021-11-19 15:36 ` H.J. Lu
2021-11-19 22:47 ` Florian Weimer
0 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2021-11-19 15:36 UTC (permalink / raw)
To: Florian Weimer; +Cc: GNU C Library, Adhemerval Zanella
On Fri, Nov 19, 2021 at 7:30 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > Executables with DT_RELR will crash mysteriously with glibc binaries
> > without DT_RELR support. Bump EI_ABIVERSION won't prevent crash since
> > the Linux kernel loader doesn't check EI_ABIVERSION on executables.
> > Adding a glibc version dependency on the first glibc version with
> > DT_RELR support will prevent backporting DT_RELR support to released
> > glibc branches.
> >
> > Add a GLIBC_PRIVATE_RELR version as a proxy for DT_RELR support in glibc.
> > Linker should add the GLIBC_PRIVATE_RELR version dependency on binaries
> > with DT_RELR. GLIBC_PRIVATE_RELR should be backported together when
> > backporting DT_RELR support.
>
> I don't like it. What's wrong about EI_ABIVERSION?
Bumping EI_ABIVERSION on executables doesn't prevent crashes
with existing ld.so binaries.
> The kernel doesn't need to check EI_ABIVERSION because it does not do
> relocation processing.
>
> Thanks,
> Florian
>
--
H.J.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR
2021-11-19 15:36 ` H.J. Lu
@ 2021-11-19 22:47 ` Florian Weimer
2021-11-20 2:55 ` H.J. Lu
0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2021-11-19 22:47 UTC (permalink / raw)
To: H.J. Lu; +Cc: GNU C Library, Adhemerval Zanella
* H. J. Lu:
> On Fri, Nov 19, 2021 at 7:30 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * H. J. Lu:
>>
>> > Executables with DT_RELR will crash mysteriously with glibc binaries
>> > without DT_RELR support. Bump EI_ABIVERSION won't prevent crash since
>> > the Linux kernel loader doesn't check EI_ABIVERSION on executables.
>> > Adding a glibc version dependency on the first glibc version with
>> > DT_RELR support will prevent backporting DT_RELR support to released
>> > glibc branches.
>> >
>> > Add a GLIBC_PRIVATE_RELR version as a proxy for DT_RELR support in glibc.
>> > Linker should add the GLIBC_PRIVATE_RELR version dependency on binaries
>> > with DT_RELR. GLIBC_PRIVATE_RELR should be backported together when
>> > backporting DT_RELR support.
>>
>> I don't like it. What's wrong about EI_ABIVERSION?
>
> Bumping EI_ABIVERSION on executables doesn't prevent crashes
> with existing ld.so binaries.
Oh, right, I keep forgetting that.
If we do not intend to backport features that require an EI_ABIVERSION
bump back further than glibc 2.34, we can rely on the __libc_start_main
switch to the GLIBC_2.34 symbol version.
Thanks,
Florian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR
2021-11-19 22:47 ` Florian Weimer
@ 2021-11-20 2:55 ` H.J. Lu
2021-11-22 18:21 ` Joseph Myers
0 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2021-11-20 2:55 UTC (permalink / raw)
To: Florian Weimer; +Cc: GNU C Library, Adhemerval Zanella
On Fri, Nov 19, 2021 at 2:47 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > On Fri, Nov 19, 2021 at 7:30 AM Florian Weimer <fweimer@redhat.com> wrote:
> >>
> >> * H. J. Lu:
> >>
> >> > Executables with DT_RELR will crash mysteriously with glibc binaries
> >> > without DT_RELR support. Bump EI_ABIVERSION won't prevent crash since
> >> > the Linux kernel loader doesn't check EI_ABIVERSION on executables.
> >> > Adding a glibc version dependency on the first glibc version with
> >> > DT_RELR support will prevent backporting DT_RELR support to released
> >> > glibc branches.
> >> >
> >> > Add a GLIBC_PRIVATE_RELR version as a proxy for DT_RELR support in glibc.
> >> > Linker should add the GLIBC_PRIVATE_RELR version dependency on binaries
> >> > with DT_RELR. GLIBC_PRIVATE_RELR should be backported together when
> >> > backporting DT_RELR support.
> >>
> >> I don't like it. What's wrong about EI_ABIVERSION?
> >
> > Bumping EI_ABIVERSION on executables doesn't prevent crashes
> > with existing ld.so binaries.
>
> Oh, right, I keep forgetting that.
What is wrong with GLIBC_PRIVATE_RELR?
> If we do not intend to backport features that require an EI_ABIVERSION
> bump back further than glibc 2.34, we can rely on the __libc_start_main
> switch to the GLIBC_2.34 symbol version.
>
GLIBC_2.34 is no better than GLIBC_PRIVATE_RELR.
--
H.J.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR
2021-11-20 2:55 ` H.J. Lu
@ 2021-11-22 18:21 ` Joseph Myers
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Myers @ 2021-11-22 18:21 UTC (permalink / raw)
To: H.J. Lu; +Cc: Florian Weimer, GNU C Library
On Fri, 19 Nov 2021, H.J. Lu via Libc-alpha wrote:
> What is wrong with GLIBC_PRIVATE_RELR?
We shouldn't have any GLIBC_PRIVATE* references in normal user binaries
built with glibc; GLIBC_PRIVATE* should be considered a namespace limited
to internal use between the various binaries built by glibc, and with no
ABI stability requirements.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-22 18:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 15:26 [PATCH] Add GLIBC_PRIVATE_RELR as proxy for DT_RELR H.J. Lu
2021-11-19 15:30 ` Florian Weimer
2021-11-19 15:36 ` H.J. Lu
2021-11-19 22:47 ` Florian Weimer
2021-11-20 2:55 ` H.J. Lu
2021-11-22 18:21 ` Joseph Myers
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).