public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/28656] New: LD_PREFER_MAP_32BIT_EXEC no longer works due to binutils changes
Date: Mon, 06 Dec 2021 12:36:33 +0000	[thread overview]
Message-ID: <bug-28656-131@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2021-12-06 12:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 12:36 fweimer at redhat dot com [this message]
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

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=bug-28656-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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).