Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "PaX Team" <pageexec@freemail.hu>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: imer_setup() is not compatible with PaX's RAP
Date: Tue, 28 Nov 2017 13:50:36 +0100	[thread overview]
Message-ID: <5A1D5B9C.27534.47CC58C6@pageexec.freemail.hu> (raw)
In-Reply-To: <CAHmME9oxY3JRX4W3Xsx-RTc-9NKEdoC_14nPz+7R2_X5b5sfJw@mail.gmail.com>

On 28 Nov 2017 at 13:36, Jason A. Donenfeld wrote:

> On Tue, Nov 28, 2017 at 1:32 PM, PaX Team <pageexec@freemail.hu> wrote:
> > targets of indirect calls must be marked by the RAP hash which the plugin
> > will do for code it sees but for asm you'll have to do it yourself, look at
> > the use of RAP_ENTRY to see how that works.
> 
> Oh, terrific. So I can just do something horrible like:
> 
> #ifdef RAP_PLUGIN
> #undef ENTRY
> #define ENTRY RAP_ENTRY
> #endif

well, that would work but if not all asm entry points are meant to be called
indirectly then you're unnecessarily increasing the attack surface ;). better
would be something like:

1. use ENTRY/RAP_ENTRY in your asm as necessary. you can call it something
   more generic like CFI_ENTRY if you want to cover other CFI systems in the
   future, e.g., intel's CET will need its own entry point marker insn.

2. have this in your headers:

#ifdef RAP_PLUGIN
#define CFI_ENTRY RAP_ENTRY
#elif defined(...)
...
#else
#define CFI_ENTRY ENTRY
#endif

      reply	other threads:[~2017-11-28 12:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-11  8:09 Tom Li
2017-11-11  8:16 ` Tom Li
2017-11-12  2:50 ` Jason A. Donenfeld
2017-11-12  3:13   ` Jason A. Donenfeld
2017-11-13  1:39   ` PaX Team
2017-11-13 19:34     ` Jason A. Donenfeld
2017-11-14  0:15       ` PaX Team
2017-11-14  9:29         ` Jason A. Donenfeld
2017-11-14 10:29           ` Jason A. Donenfeld
2017-11-14 11:12           ` PaX Team
2017-11-28 12:20             ` Jason A. Donenfeld
2017-11-28 12:32               ` PaX Team
2017-11-28 12:36                 ` Jason A. Donenfeld
2017-11-28 12:50                   ` PaX Team [this message]

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=5A1D5B9C.27534.47CC58C6@pageexec.freemail.hu \
    --to=pageexec@freemail.hu \
    --cc=Jason@zx2c4.com \
    --cc=wireguard@lists.zx2c4.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 NNTP newsgroup(s).