From: Richard Henderson <rth@redhat.com>
To: libffi-discuss@sourceware.org
Subject: Constant trampoline pages
Date: Fri, 23 Jan 2015 17:54:00 -0000 [thread overview]
Message-ID: <54C28ACB.8030702@redhat.com> (raw)
The current iOS support to have a page of allocated trampolines that gets
remapped as needed, rather than writing and flushing them, makes me wonder if
we shouldn't do the same thing for *all* targets.
Years ago I wrote a small library to demonstrate this on Linux. The idea was
to be able to use these trampolines for nested functions within gcc. That
never went anywhere because people were more interested in avoiding trampolines
entirely than making them work better.
But for libffi it could work better than our current workarounds for selinux.
The source for my trampoline library can be found at
git://github.com/rth7680/tramp.git
Possibly the most interesting part is the tramp-raw.c file, where I map back
from an address in virtual memory back to a filename + file offset. At least
for elf hosts with dl_iterate_phdr, which is Linux plus recent BSDs afaik.
Thoughts?
r~
next reply other threads:[~2015-01-23 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 17:54 Richard Henderson [this message]
2015-01-26 10:02 ` Andrew Haley
2015-01-26 17:31 ` Richard Henderson
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=54C28ACB.8030702@redhat.com \
--to=rth@redhat.com \
--cc=libffi-discuss@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).