public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
@ 2021-12-06 12:36 fweimer at redhat dot com
2021-12-10 15:20 ` [Bug dynamic-link/28656] " hjl.tools at gmail dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2021-12-06 12:36 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
Bug ID: 28656
Summary: LD_PREFER_MAP_32BIT_EXEC no longer works due to
binutils changes
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
Host: x86-64
The first LOAD segment of system libraries is no longer executable, which
disables MAP_32BIT processing with LD_PREFER_MAP_32BIT_EXEC. This is a result
of a binutils change (likely defaulting to -z separate-code).
I think we should recommend using a PIE executable with an explicit loader
invocation as a replacement. It achieves the same effect (everything is mapped
into one 4 GB window):
$ /lib64/ld-linux-x86-64.so.2 /bin/cut -d ' ' -f 1 /proc/self/maps
55555701b000-55555703c000
7f09b3b3c000-7f09b3b91000
7f09b3b91000-7f09b3e09000
7f09b3e09000-7f09b3e0c000
7f09b3e0c000-7f09b3e38000
7f09b3e38000-7f09b3fae000
7f09b3fae000-7f09b4002000
7f09b4002000-7f09b4003000
7f09b4003000-7f09b4006000
7f09b4006000-7f09b4009000
7f09b4009000-7f09b4018000
7f09b4019000-7f09b401a000
7f09b401a000-7f09b401b000
7f09b401b000-7f09b401c000
7f09b401c000-7f09b401d000
7f09b401d000-7f09b401e000
7f09b401e000-7f09b401f000
7f09b401f000-7f09b4020000
7f09b4020000-7f09b4021000
7f09b4021000-7f09b4022000
7f09b4022000-7f09b4029000
7f09b4029000-7f09b402a000
7f09b402a000-7f09b402c000
7f09b402c000-7f09b4032000
7f09b4032000-7f09b4034000
7f09b4034000-7f09b4035000
7f09b4035000-7f09b4036000
7f09b4036000-7f09b4037000
7f09b4037000-7f09b4038000
7f09b4038000-7f09b405e000
7f09b405e000-7f09b4068000
7f09b4068000-7f09b406a000
7f09b406a000-7f09b406c000
7ffd90134000-7ffd90155000
7ffd901fa000-7ffd901fe000
7ffd901fe000-7ffd90200000
ffffffffff600000-ffffffffff601000
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug dynamic-link/28656] LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
@ 2021-12-10 15:20 ` hjl.tools at gmail dot com
2021-12-10 15:21 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-10 15:20 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13843
--> https://sourceware.org/bugzilla/attachment.cgi?id=13843&action=edit
A patch
How about this?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug dynamic-link/28656] LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
2021-12-10 15:20 ` [Bug dynamic-link/28656] " hjl.tools at gmail dot com
@ 2021-12-10 15:21 ` hjl.tools at gmail dot com
2021-12-10 15:33 ` fweimer at redhat dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-10 15:21 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #13843|0 |1
is obsolete| |
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 13844
--> https://sourceware.org/bugzilla/attachment.cgi?id=13844&action=edit
A fixed patch
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug dynamic-link/28656] LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
2021-12-10 15:20 ` [Bug dynamic-link/28656] " hjl.tools at gmail dot com
2021-12-10 15:21 ` hjl.tools at gmail dot com
@ 2021-12-10 15:33 ` fweimer at redhat dot com
2021-12-10 15:35 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2021-12-10 15:33 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Comment on attachment 13844
--> https://sourceware.org/bugzilla/attachment.cgi?id=13844
A fixed patch
This has impact on an unknown number of other things.
I think we should something like <dl-mmap-object.h> that provides a mmap that
is only used for mapping objects, and change dl-map-segments.h to use that. The
PROT_EXEC kludge is probably there for JIT support. So we'd perhaps need both.
Is it really necessary to carry this forward? I think we added it for Xeon Phi,
and that's really very much discontinued by now.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug dynamic-link/28656] LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
` (2 preceding siblings ...)
2021-12-10 15:33 ` fweimer at redhat dot com
@ 2021-12-10 15:35 ` hjl.tools at gmail dot com
2021-12-10 15:37 ` fweimer at redhat dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-10 15:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Florian Weimer from comment #3)
>
> Is it really necessary to carry this forward? I think we added it for Xeon
> Phi, and that's really very much discontinued by now.
I am OK to drop it entirely.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug dynamic-link/28656] LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
` (3 preceding siblings ...)
2021-12-10 15:35 ` hjl.tools at gmail dot com
@ 2021-12-10 15:37 ` fweimer at redhat dot com
2021-12-10 15:42 ` hjl.tools at gmail dot com
2022-01-05 13:38 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2021-12-10 15:37 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to H.J. Lu from comment #4)
> (In reply to Florian Weimer from comment #3)
> >
> > Is it really necessary to carry this forward? I think we added it for Xeon
> > Phi, and that's really very much discontinued by now.
>
> I am OK to drop it entirely.
Let's do that, then. It's presence is confusing.
Would you be able to send a patch? Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug dynamic-link/28656] LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
` (4 preceding siblings ...)
2021-12-10 15:37 ` fweimer at redhat dot com
@ 2021-12-10 15:42 ` hjl.tools at gmail dot com
2022-01-05 13:38 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-10 15:42 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |hjl.tools at gmail dot com
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Florian Weimer from comment #5)
> (In reply to H.J. Lu from comment #4)
> > (In reply to Florian Weimer from comment #3)
> > >
> > > Is it really necessary to carry this forward? I think we added it for Xeon
> > > Phi, and that's really very much discontinued by now.
> >
> > I am OK to drop it entirely.
>
> Let's do that, then. It's presence is confusing.
>
> Would you be able to send a patch? Thanks.
Sure.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug dynamic-link/28656] LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
` (5 preceding siblings ...)
2021-12-10 15:42 ` hjl.tools at gmail dot com
@ 2022-01-05 13:38 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2022-01-05 13:38 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28656
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |2.35
Version|unspecified |2.35
Resolution|--- |FIXED
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
commit ea5814467a02c9d2d7608b6445c5d60e2a81d3ee
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Dec 10 13:00:09 2021 -0800
x86-64: Remove LD_PREFER_MAP_32BIT_EXEC support [BZ #28656]
Remove the LD_PREFER_MAP_32BIT_EXEC environment variable support since
the first PT_LOAD segment is no longer executable due to defaulting to
-z separate-code.
This fixes [BZ #28656].
Reviewed-by: Florian Weimer <fweimer@redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-01-05 13:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 12:36 [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes fweimer at redhat dot com
2021-12-10 15:20 ` [Bug dynamic-link/28656] " hjl.tools at gmail dot com
2021-12-10 15:21 ` hjl.tools at gmail dot com
2021-12-10 15:33 ` fweimer at redhat dot com
2021-12-10 15:35 ` hjl.tools at gmail dot com
2021-12-10 15:37 ` fweimer at redhat dot com
2021-12-10 15:42 ` hjl.tools at gmail dot com
2022-01-05 13:38 ` hjl.tools at gmail dot com
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).