public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Topi Miettinen via Libc-alpha <libc-alpha@sourceware.org>
Cc: Topi Miettinen <toiwoton@gmail.com>
Subject: Re: Randomize offset between program segments?
Date: Wed, 21 Oct 2020 07:33:26 +0200	[thread overview]
Message-ID: <87y2k016u1.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <f7ce6a45-358e-f024-def3-ef3c223a241e@gmail.com> (Topi Miettinen via Libc-alpha's message of "Mon, 19 Oct 2020 18:31:47 +0300")

* Topi Miettinen via Libc-alpha:

> I'd like to improve address space randomization (ASLR) by randomizing
> the offset between .text, .data and .bss segments (or more
> generalized, any program segments). With large code generation model
> (-mcmodel=large) on AMD64, the offset could be very large, but even
> with the default model, the segments could be randomized within range
> of RIP-relative accesses (+/-2GB). Currently the dynamic loader can't
> randomize the segments (nothing also tells it if this would be OK) so
> it maps them next to each other, which is predictable and boring.

As far as I understand it, -mcmodel=large does not really work right now
with a stock toolchain.

But what you are asking for looks more like FDPIC support to me anyway.
I do not think it's particularly useful to implement this for targets
which have an MMU, to be honest.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill


  parent reply	other threads:[~2020-10-21  5:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 15:31 Topi Miettinen
2020-10-21  2:21 ` Siddhesh Poyarekar
2020-10-21  7:40   ` Topi Miettinen
2020-10-21  9:14     ` Siddhesh Poyarekar
2020-10-21  9:34       ` Topi Miettinen
2020-10-21  9:54         ` Siddhesh Poyarekar
2020-10-21 10:44           ` Topi Miettinen
2020-10-29  8:04             ` Siddhesh Poyarekar
2020-10-30 15:37               ` Topi Miettinen
2020-10-21  5:33 ` Florian Weimer [this message]
2020-10-21  8:02   ` Topi Miettinen
2020-10-21  8:06     ` Florian Weimer
2020-10-21  9:28       ` Topi Miettinen

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=87y2k016u1.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=toiwoton@gmail.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).