caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@college-de-france.fr>
To: Hendrik Boom <hendrik@topoi.pooq.com>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Any plans for supporting Intel CET in OCaml?
Date: Wed, 31 Jul 2019 17:21:08 +0200	[thread overview]
Message-ID: <CAH=h3gG+WyBq2bMb5hzkmOFNF0ibBy2iSg4tqVn8oBRD4cLT=w@mail.gmail.com> (raw)
In-Reply-To: <20190731141952.zod7aftusgchoiyq@topoi.pooq.com>

[-- Attachment #1: Type: text/plain, Size: 1839 bytes --]

On Wed, Jul 31, 2019 at 4:20 PM Hendrik Boom <hendrik@topoi.pooq.com> wrote:

>
> There is, of course, also the question what would happen on nonintel or
> older  machines if they don't have those ENDBR64 or ENDBR32
> instructions in the hardware.
>

I read somewhere that those instructions look like no-ops on older
machines.

>
> (Such as, perhaps, an actual AMD-manufactured AMD64?  Like my
> 10-year-old AMD server?)
>
> Do we now have two distinct platforms to support?
>

It could be a configure-time choice.  I wouldn't call that two distinct
platforms, more like two variants of the same platform.

Just speculating here.  All this needs to be discussed and agreed on, of
course.

- Xavier Leroy


> -- hendrik
>
> >
> >
> > >
> > > There's also some stuff with shadow stacks which looks a lot more
> > > complicated and I didn't fully understand.  The whole thing is
> > > described in:
> > >
> > >
> > >
> https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf
> > > https://lwn.net/Articles/758245/
> > >
> > >
> > I don't understand how these shadow stacks are supposed to interact with
> > exception handling, either Caml-style or C++/Java style.
> >
> > Kind regards,
> >
> > - Xavier Leroy
> >
> >
> > > Unfortunately (but for obvious reasons) every asm object in a program
> > > must be compiled with CET in order to enable the feature for the
> > > program as a whole.  This means that any mixed OCaml/C program can't
> > > benefit from CET even in the C parts, unless we also support this in
> > > the OCaml parts.
> > >
> > > Has anyone looked into supporting this kind of thing in the amd64
> > > backend?
> > >
> > > (I looked at the OCaml trunk and couldn't see any relevant commits,
> > > but maybe I missed something in my grepping).
> > >
> > > Rich.
> > >
>

[-- Attachment #2: Type: text/html, Size: 3101 bytes --]

  reply	other threads:[~2019-07-31 15:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 14:28 Richard W.M. Jones
2019-07-25 15:52 ` Gerd Stolpmann
2019-07-25 19:24   ` Hendrik Boom
2019-07-31 12:05 ` Xavier Leroy
2019-07-31 14:19   ` Hendrik Boom
2019-07-31 15:21     ` Xavier Leroy [this message]
2019-07-31 17:40       ` Ivan Gotovchits

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='CAH=h3gG+WyBq2bMb5hzkmOFNF0ibBy2iSg4tqVn8oBRD4cLT=w@mail.gmail.com' \
    --to=xavier.leroy@college-de-france.fr \
    --cc=caml-list@inria.fr \
    --cc=hendrik@topoi.pooq.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).