public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Anthony Green <green@moxielogic.com>
To: Andrew Haley <aph@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
		"libffi-discuss@sourceware.org" <libffi-discuss@sourceware.org>
Subject: Re: Avoid stack/heap executable memory
Date: Wed, 04 May 2016 12:42:00 -0000	[thread overview]
Message-ID: <CACxje59nefxc_9ZtO7xMSEYsr+igrYe0mzx91GgCJCgHM4242g@mail.gmail.com> (raw)
In-Reply-To: <5729CC44.10601@redhat.com>

Can't there be special kernel support for this kind of situation?
Like https://pax.grsecurity.net/docs/emutramp.txt

(resent because original was bounced by sourceware)

AG

On Wed, May 4, 2016 at 6:17 AM, Andrew Haley <aph@redhat.com> wrote:
> On 05/04/2016 12:32 AM, Richard Henderson wrote:
>> Of course, this will change the ABI, but I think we can work around that (at
>> least for ELF with symbol versioning), and also preserve the API.  Of course,
>> there's a *lot* that can be cleaned up if we're willing to change the API...
>
> For a long while now I've wanted to go in the opposite direction: to
> use a small JIT compiler to generate efficient code for invocations in
> both directions.  It doesn't have to be very complicated, and once
> you've generated code for any particular set of arguments that shim
> can be cached for use by any function with the same argument types.
> This could either use an existing JIT library or a custom JIT created
> just for libffi.  It would often be way more efficient than what we do
> at present.
>
> But it would keep bumping up against the "no executable and writable
> memory!" meme.  Of course security is important, but I can't help
> thinking that by being rigid about this we're performing a DOS attack
> on ourselves.
>
> Andrew.

  reply	other threads:[~2016-05-04 12:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 21:28 Demi Obenour
2016-05-03 23:33 ` Richard Henderson
2016-05-04 10:17   ` Andrew Haley
2016-05-04 12:42     ` Anthony Green [this message]
2016-05-04 16:14       ` Jay

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=CACxje59nefxc_9ZtO7xMSEYsr+igrYe0mzx91GgCJCgHM4242g@mail.gmail.com \
    --to=green@moxielogic.com \
    --cc=aph@redhat.com \
    --cc=libffi-discuss@sourceware.org \
    --cc=rth@redhat.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).