From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTPS id 6AE792DF5 for ; Thu, 11 Oct 2018 11:52:10 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.54,368,1534802400"; d="scan'208,217";a="350697071" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 11 Oct 2018 13:52:08 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id A1C8782515; Thu, 11 Oct 2018 13:52:08 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 306FE824F6 for ; Thu, 11 Oct 2018 13:52:02 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=ivanatodvuk@gmail.com; spf=Pass smtp.mailfrom=ivanatodvuk@gmail.com; spf=None smtp.helo=postmaster@mail-ed1-f41.google.com IronPort-PHdr: =?us-ascii?q?9a23=3Aic/mHBVO+AvwXoZyQWN2EiKQzKPV8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYYx2Ht8tkgFKBZ4jH8fUM07OQ7/i/HzRYqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRo?= =?us-ascii?q?LerpBIHSk9631+ev8JHPfglEnjWwba9wIRmssQndqtQdjJd/JKo21hbHuGZDdf?= =?us-ascii?q?5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXM?= =?us-ascii?q?TRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmij?= =?us-ascii?q?oINyQh/W7YhMx/jqJVrhyiqRJi3YDbfJqYO+Bicq7HZ94WWXZNU8RXWidcAo28?= =?us-ascii?q?dYwPD+8ZMOhbsYnyvV0OogGjDgajGePvyThIhmP33aImzu8sFgDG3BI6ENIIqn?= =?us-ascii?q?vUsNL1O7oMUeCoz6nF1jrDb/ZM1jf87IjEaAwuofaJXb9pd8fa1EchFwTAjlqK?= =?us-ascii?q?qIzlOSuY1uULs2iB7upvT/iji2A9qw1prTivx9ssionUho0O0FzL6SJ5wIMzKN?= =?us-ascii?q?alS0B7ecapHIVMuyyeLYd7QcMvT3t2tComybAKo5G2cDUMxZ863RDQceaHfJKN?= =?us-ascii?q?4h/7VOaePzN4hHV9dbK6nRmy8EygxvTiWcapzVpGtyRFn9bRunwX2BzT7c+HSv?= =?us-ascii?q?R5/ki/wzqAywfT6uRcLUA1k6rUNYIhz6YumpYPtUnPBCz7lUXsgKOIakkp+fKk?= =?us-ascii?q?5uv6brn+o5+TLY50igXwMqQ0ncy/BPw1MgkQX2eB/+SzzqHj/UrkT7VUk/02kb?= =?us-ascii?q?LUsJ/fJcsBp665BxVZ3Zok6xa6FzumysgXnWEbLFJZfxKKl5TmNEvLIPD8FPu/?= =?us-ascii?q?h1WskCx3x/3dJb3gApDNLmDZn7v7fLZ97VRcyAspwtxF6ZJUEOJJHPWmXE76s9?= =?us-ascii?q?jRFVk+MQG4yqDtAc9V0o4OWGyORKSeNeeaulaN4qcrIvKQTI4Tojf0bfY/tND0?= =?us-ascii?q?inpsuEEUe6Dh44YUb2y5FbwyIluQZ3PwhdsfDGQisQ83Teisg1qHB20AL02uVr?= =?us-ascii?q?4xs2loQLmtCp3OE9j00e6xmRyjF5gTXVhoT1WFEHPmbYKBAq5eZyebI8snmTsB?= =?us-ascii?q?B+H4F90RkCq2vQq/8IJJa/LO83RB553m3dlxoebUkENqrGEmP4Gmy2iIClpMsC?= =?us-ascii?q?YISjsxhv0tpEV8zhKO3fE9jaABU9NU4PxNX0ExMpuOl+E=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0COAgA0OL9bgCnQVdFiHQEBBQEHBQGBZ?= =?us-ascii?q?YJqfyiDdVJLglyQU4INkTuFWYFmDSOESQKEVRkHAQQ0FgEDAQECAQEBAQETAQE?= =?us-ascii?q?JDQkIJyUMgjYigmEBAQEBAgEjHQEbEgwDAQsGBQQHDSoCAiEBAREBBQEcBxKDI?= =?us-ascii?q?AGBaAEDDQgPmjE8iwuBEQUBF4J2BYEwAQcHgjEKGScNWoE2AgEFEoszF4IAhCS?= =?us-ascii?q?CVkUCAYEoEVSCVIJXApQmiTwuCYIPhEODFYNMgyEXgU+Ea4lXjDR0iFsPIYE4g?= =?us-ascii?q?XYzGiNQMYI7ghqCOoEvgT6JFj0wAYoTB4JGAQE?= X-IPAS-Result: =?us-ascii?q?A0COAgA0OL9bgCnQVdFiHQEBBQEHBQGBZYJqfyiDdVJLgly?= =?us-ascii?q?QU4INkTuFWYFmDSOESQKEVRkHAQQ0FgEDAQECAQEBAQETAQEJDQkIJyUMgjYig?= =?us-ascii?q?mEBAQEBAgEjHQEbEgwDAQsGBQQHDSoCAiEBAREBBQEcBxKDIAGBaAEDDQgPmjE?= =?us-ascii?q?8iwuBEQUBF4J2BYEwAQcHgjEKGScNWoE2AgEFEoszF4IAhCSCVkUCAYEoEVSCV?= =?us-ascii?q?IJXApQmiTwuCYIPhEODFYNMgyEXgU+Ea4lXjDR0iFsPIYE4gXYzGiNQMYI7ghq?= =?us-ascii?q?COoEvgT6JFj0wAYoTB4JGAQE?= X-IronPort-AV: E=Sophos;i="5.54,368,1534802400"; d="scan'208,217";a="350697022" Received: from mail-ed1-f41.google.com ([209.85.208.41]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Oct 2018 13:52:01 +0200 Received: by mail-ed1-f41.google.com with SMTP id y20-v6so7966338eds.10 for ; Thu, 11 Oct 2018 04:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Vewh+aIJOGqnSP/BaSIkc/ILgSSF2ZxLXUZaJdY681k=; b=jXYI32LxI71hwBm3YF9FZdEKc0ziFGy+/FYEiRBDXiZG/IJ190Z2tQ0x5j4GEw0w/f tzsZj9rKOaUjzV/IJDlq2kQPezVL4xbNHawX7JvmVXfjGukxoyB9q4r4eWp0dsQix5Wa X/peQwMeVzu/qAaJL9RCPW/joJvDUx55FejcDrS4e+98Q1lLdq7LNx9yu5nNkp3DXDwc oIt8qjuku2XSUDe53S8TLJg4irkxpEeeV4E74Glgv6F2KLI3gQyQDJCn0AVISQS2fcuN LKwXs8Ya+tRCENadbReJ9SZyYtTpOOPxTxA59tKJU8qBRGEz+EInxqaT/TAWr9Rp6Ryt 94ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Vewh+aIJOGqnSP/BaSIkc/ILgSSF2ZxLXUZaJdY681k=; b=Fl24wBQ4ghaVnbJYUGT0fiPG/VW0nSlNJ108VwbJ3D4hUoDrYBcVCRAPI3aEknFZoK EjN7csNWnXSvNvcQufj+pOhZ4uCvjrNKbAOuIE8TrWri5tapobrGVpRN+XYObjPFyqUq SsIIF/9+0aohdNBfWg+5zbYymQ0d+02ePC5+coeFxC/RSVHn2BD1FwTE73NPDwmva7io eBdrOGsaNSRfv8TEUVKA+5KUOQGTyN5r6o76aBXDxY6V2LAR6PX+bRYcoCtapw1TmxdN l5HyzUBtuKvRYnvMZij/CKPDCn3aoVqhNNpnJQ6RpDjNS7bF+zNt+nQvZzhHScRk3rDk ZmDA== X-Gm-Message-State: ABuFfoidyWVySVSPIbmbw7LmP8nXJlL23oo8LcVd3+bRVIpA8AhBddfw s6Yw35MA5Zw7HD6Je/sYIM4Pt7tVeSWIPVqJDqj1Wt5J X-Google-Smtp-Source: ACcGV62aPTV4rOy8oXKDqYrhXYImu2rlXo+0Cbx7FQ4bSjas7agPnxyUibeEnTiFGkbUOKYse6zMIhnkhJDBHcqHyCg= X-Received: by 2002:a17:906:49c9:: with SMTP id w9-v6mr1889283ejv.12.1539258720446; Thu, 11 Oct 2018 04:52:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ivana Vukotic Date: Thu, 11 Oct 2018 13:51:48 +0200 Message-ID: To: nicolas.ojeda.bar@lexifi.com, caml-list@inria.fr Content-Type: multipart/alternative; boundary="0000000000003fedd90577f299ec" Subject: Re: [Caml-list] OCaml and SGX Reply-To: Ivana Vukotic X-Loop: caml-list@inria.fr X-Sequence: 17099 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000003fedd90577f299ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dera Nicolas, Thank you for your suggestion! Actually I already posted the same question with code on the github: https://github.com/intel/linux-sgx/issues/315 Best, Ivana On Thu, Oct 11, 2018 at 1:42 PM Nicol=C3=A1s Ojeda B=C3=A4r < nicolas.ojeda.bar@lexifi.com> wrote: > Dear Ivana, > > You may get more people willing to help if you put up the simple > example somewhere publicly accessible, such as github. > > Best wishes, > Nicol=C3=A1s > On Tue, Oct 9, 2018 at 6:23 PM Ivana Vukotic > wrote: > > > > Hi, > > > > We are trying to run some OCaml code within an Intel SGX enclave. > > > > This OCaml code is called by a C wrapper using the method described > > here: https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html > > > > Because Intel SGX doesn't support the entire standard C library, we had > > to create ocalls for the functions that are used by ocamlrun but not > > supported by SGX. Using the functionalities provided by Intel SGX, we > > managed to create an .so library containing our OCaml code along with > > the C wrapper. This .so library is what is meant to run in an SGX > > enclave (we so far only implemented the ocalls that we needed, and not > > all missing functionalities from ocamlrun). > > > > Our problem is now that when we call caml_startup from within our C > > wrapper (in order to start the OCaml code), the code seem to simply call > > 'exit' and stop there. Does anyone know why this call to caml_startup > > would call 'exit'? > > > > We managed to create a simple example, which I can forward to anyone > interested > > to take a look (unfortunately mailing list has a limited attachment and > I can not > > send it). > > > > Please note that we use ocaml 4.06.1 and gcc 7.3.0 > > > > Best, > > > > Ivana > --=20 Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs= --0000000000003fedd90577f299ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dera Nicolas,

Thank you for your suggestion!

Actually I alrea= dy posted the same question with code on the github:
<= a href=3D"https://github.com/intel/linux-sgx/issues/315">https://github.com= /intel/linux-sgx/issues/315


Bes= t,
Ivana


On Thu, Oct 11, 2018 at 1:42 PM Nicol=C3=A1s Oj= eda B=C3=A4r <nicolas.oj= eda.bar@lexifi.com> wrote:
D= ear Ivana,

You may get more people willing to help if you put up the simple
example somewhere publicly accessible, such as github.

Best wishes,
Nicol=C3=A1s
On Tue, Oct 9, 2018 at 6:23 PM Ivana Vukotic <ivanatodvuk@gmail.com> wrote:
>
> Hi,
>
> We are trying to run some OCaml code within an Intel SGX enclave.
>
> This OCaml code is called by a C wrapper using the method described
> here:=C2=A0 https://caml.inria.fr/pub/doc= s/manual-ocaml/intfc.html
>
> Because Intel SGX doesn't support the entire standard C library, w= e had
> to create ocalls for the functions that are used by ocamlrun but not > supported by SGX.=C2=A0 Using the functionalities provided by Intel SG= X, we
> managed to create an .so library containing our OCaml code along with<= br> > the C wrapper.=C2=A0 This .so library is what is meant to run in an SG= X
> enclave (we so far only implemented the ocalls that we needed, and not=
> all missing functionalities from ocamlrun).
>
> Our problem is now that when we call caml_startup from within our C
> wrapper (in order to start the OCaml code), the code seem to simply ca= ll
> 'exit' and stop there.=C2=A0 Does anyone know why this call to= caml_startup
> would call 'exit'?
>
> We managed to create a simple example, which I can forward to anyone i= nterested
> to take a look (unfortunately mailing list has a limited attachment an= d I can not
>=C2=A0 send it).
>
> Please note that we use ocaml 4.06.1 and gcc 7.3.0
>
> Best,
>
> Ivana
--0000000000003fedd90577f299ec--