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 ESMTP id 537CA2DF5 for ; Thu, 11 Oct 2018 14:03:11 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.54,368,1534802400"; d="scan'208,217";a="350726909" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 11 Oct 2018 16:03:07 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 859B782515; Thu, 11 Oct 2018 16:03:07 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id AF004824E4 for ; Thu, 11 Oct 2018 16:02:59 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=ivanatodvuk@gmail.com; spf=Pass smtp.mailfrom=ivanatodvuk@gmail.com; spf=None smtp.helo=postmaster@mail-ed1-f52.google.com IronPort-PHdr: =?us-ascii?q?9a23=3AyEB7zxPuBSURXqJpswsl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0Lfv7rarrMEGX3/hxlliBBdydt6obzbKO+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1?= =?us-ascii?q?Ov71GonPhMiryuy+4ZLebxlKiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPde?= =?us-ascii?q?RWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbY?= =?us-ascii?q?UwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhS?= =?us-ascii?q?gIOT428mHZhMJzgqxGvhyuuwdyzJTIbIyPLvdyYr/RcNEcSGFcXshRTStBAoak?= =?us-ascii?q?YoUMEeoOJ+BYoJPgrFQBsBu+Bg6sBP/uyjBUm3T72qw60/o7HgHAxgMgA9UOv2?= =?us-ascii?q?nKrNXoN6cfSu+1zKzSwjXCa/Nawyvy6I/Nch04p/yHQLx+cc3UyUY1FgPFiE2d?= =?us-ascii?q?qY3jPzOP1+QCqXKX7+R6Ve63hG4nqh1xojiyxsg3kIXGmoUVylXC+C5kw4g1Pc?= =?us-ascii?q?W1RFBnbdOgCpddtCGXO5FoTs8+QGxkoiY3xqMAtJWmZiYF0o4nyATaa/Gfc4iH?= =?us-ascii?q?/BbjVOGJLDd9nn1leba/iw+s/ke91+HwT8e03VZUoiZfndnMsXcN1xPX6seZUP?= =?us-ascii?q?dy4kCh2TOX2wDS7OFLP1w0mLLFJ5I9xrM8jJkevETZEiPohEn7j7Wae0U69uSw?= =?us-ascii?q?7uToeLTmppuSN49ujQH+N7wjms2hAesiNAgBRXSb+eOh27394E35Q65HjvIzkq?= =?us-ascii?q?bDsZDaId4XqbK+Aw9Qyooj8QqwDy+60NQEmnkKNE5KdwiCj4jtIl3OJPH4Deyj?= =?us-ascii?q?g1m3izdqx/XGPqX7DZnXL3jDlq3hfbdn5EJGxgoz14MX25UBDLAKJ/b6QQn2tt?= =?us-ascii?q?HUB1kzOhacx+v3Cdt8kIgZXDGhGKicZYLMuFmBrtwyIO6QZYRd7DfjIv4s+/ni?= =?us-ascii?q?k2I6sVAYdKitm5AQbSbrTbxdP0yFbC+00Z86GmAQs19mFb24uBi5STdWIk2Kce?= =?us-ascii?q?c57zA/BpihCN6aFI+oib2Fmiy8G88PPzwUOhW3CX7tMr68dbIUcivLe51ulzUF?= =?us-ascii?q?Uf6qTIpzjUjz5j+/8KJuK6/vwgNdtZ/n04IotejalBV3+DAtSsrAiSeCSGZ7mm?= =?us-ascii?q?5OTDgzjvhy?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ASAgDqVr9bhjTQVdFiHAEBAQQBAQcEA?= =?us-ascii?q?QGBZYJqfyiDdYEdglySYJE7hVmBZg0jhEkChFUZBwEENBYBAwEBAgEBAQEBEwE?= =?us-ascii?q?BAQgLCwgpIwyCNiKCYQEBAQECASMdARsSCwEDAQsGBQsNKgICIQEBEQEFARwZg?= =?us-ascii?q?yABgWgBAw0ID5pEPIsLgREFAReCdgWBMAEHB4IwChknDVqBNgIBBRKLMxeCAIQ?= =?us-ascii?q?kglZFAgGBKBFUglSCVwKdYi4Jgg+EQ4MVg0yDIReBT4RriVeMNHSIWw8hgTiBd?= =?us-ascii?q?jMaI1AxgjuCGhqCIIEvgT6JFj0wAYoTB4JGAQE?= X-IPAS-Result: =?us-ascii?q?A0ASAgDqVr9bhjTQVdFiHAEBAQQBAQcEAQGBZYJqfyiDdYE?= =?us-ascii?q?dglySYJE7hVmBZg0jhEkChFUZBwEENBYBAwEBAgEBAQEBEwEBAQgLCwgpIwyCN?= =?us-ascii?q?iKCYQEBAQECASMdARsSCwEDAQsGBQsNKgICIQEBEQEFARwZgyABgWgBAw0ID5p?= =?us-ascii?q?EPIsLgREFAReCdgWBMAEHB4IwChknDVqBNgIBBRKLMxeCAIQkglZFAgGBKBFUg?= =?us-ascii?q?lSCVwKdYi4Jgg+EQ4MVg0yDIReBT4RriVeMNHSIWw8hgTiBdjMaI1AxgjuCGhq?= =?us-ascii?q?CIIEvgT6JFj0wAYoTB4JGAQE?= X-IronPort-AV: E=Sophos;i="5.54,368,1534802400"; d="scan'208,217";a="281800640" Received: from mail-ed1-f52.google.com ([209.85.208.52]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Oct 2018 16:02:58 +0200 Received: by mail-ed1-f52.google.com with SMTP id h13-v6so8390367edq.0 for ; Thu, 11 Oct 2018 07:02:58 -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 :cc; bh=KEiLhN47pFclB41FAyYeey+kccolqZr23dZmUVWBRqw=; b=n9DJQTLROlcrNyH23Ct8CWeY73kI8fkC4eJNCtUQPnRk0vyQRQO3/aJuZpQ0hBlQ2t p7P428HhAdeyB4Jr37cPx/0m50RELO1eZtGmv1EMCoufpO+XqqvLpqENIImHcH4YrQXS cVcWrOYIOfMMCKX9OoSIaee6jz382VKjvCWidwYmVMQyUjatuKMO1JqcByCCKtYoK15L 5mAIgZCw66TV4SWChxZ9bt6/6+ZRAa9oloahqYBkeMAxA77UmH1Pm3leJx/1wWLE2RPq 8BiLbE2PsLuHp8laC4Ts0VpsBCZQEql8tLTNQF2+8gZ2UVUGUpGJhJCXaEhcudi1uiJ2 GAIg== 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:cc; bh=KEiLhN47pFclB41FAyYeey+kccolqZr23dZmUVWBRqw=; b=A8NNSF63DDYW7Orh54xJUiXIQcpQ/Yx97h9wV6/KEGPh8kwfp8dkN1tqySRfvjmQJ6 JIvCey3zldg2u/4/m2X980iYaE8AsOEqj4M8bJvzkGzhKrN4r0vTRUfoG/VNMBmvryKi rERkaSxJAKZTfV2qPNRF4B6w3i38d2KQQ1E+XtUrDUjrxQtAhWUckGcWkSw7IoUTVc9B j63gtJ/UsVkJIjHgEiwjW6sY7/hLbEtBnJ5vZZwa+HWbxvi9SGEGF9PE9Gvs2J+80dPJ 4fu19BAUUvtW8Hr9c1ICCyNl+ihrzJO0Ad+VDtO9pLjego+KqebR7IpPx/5y1ZlbxFLl MGSw== X-Gm-Message-State: ABuFfohH3hXlIqdMBYHPijPVLqkAPyXWLCrPv+JIBBQvnxD8+zaR2b5p vL07FYCRyKicLR9nbXKcTSQcI7EPr5Yjx3pGTdOt1g== X-Google-Smtp-Source: ACcGV610RkDZN3FVhIS8s5KP/xwXW8zzpB74EmsaWX5dWEU9XRtyH4/jqdwOSgE5paqCXVHtuNWrHt6DlayTQIaRZoM= X-Received: by 2002:a17:906:5512:: with SMTP id r18-v6mr2416843ejp.15.1539266577576; Thu, 11 Oct 2018 07:02:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ivana Vukotic Date: Thu, 11 Oct 2018 16:02:45 +0200 Message-ID: To: nicolas.ojeda.bar@lexifi.com Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary="0000000000009238580577f46d5c" Subject: Re: [Caml-list] OCaml and SGX Reply-To: Ivana Vukotic X-Loop: caml-list@inria.fr X-Sequence: 17102 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: --0000000000009238580577f46d5c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Nicolas, The call to caml_startup can be find in Enclave/Enclave.c Best regards, Ivana On Thu, Oct 11, 2018 at 1:59 PM Nicol=C3=A1s Ojeda B=C3=A4r < nicolas.ojeda.bar@lexifi.com> wrote: > Dear Ivana, > > There doesn't seem to be any call to caml_startup in the code you posted. > > Regards, > Nicol=C3=A1s > On Thu, Oct 11, 2018 at 1:52 PM Ivana Vukotic > wrote: > > > > 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 n= ot > >> > 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_start= up > >> > 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= --0000000000009238580577f46d5c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear Nicolas,

The call to ca= ml_startup can be find in Enclave/Enclave.c

Best r= egards,
Ivana

On Thu, Oct 11, 2018 at 1:59 PM Nicol=C3=A1s Ojeda B=C3=A4r <= ;nicolas.ojeda.bar@lexifi.c= om> wrote:
Dear Ivana,

There doesn't seem to be any call to caml_startup in the code you poste= d.

Regards,
Nicol=C3=A1s
On Thu, Oct 11, 2018 at 1:52 PM Ivana Vukotic <ivanatodvuk@gmail.com> wrote:
>
> 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<= br> >
>
> Best,
> Ivana
>
>
> On Thu, Oct 11, 2018 at 1:42 PM Nicol=C3=A1s Ojeda B=C3=A4r <nicolas.ojeda.b= ar@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 <ivanatodvuk@gmail.com> wro= te:
>> >
>> > Hi,
>> >
>> > We are trying to run some OCaml code within an Intel SGX encl= ave.
>> >
>> > This OCaml code is called by a C wrapper using the method des= cribed
>> > here:=C2=A0 https://caml.inria.f= r/pub/docs/manual-ocaml/intfc.html
>> >
>> > Because Intel SGX doesn't support the entire standard C l= ibrary, we 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 SGX, we
>> > managed to create an .so library containing our OCaml code al= ong with
>> > the C wrapper.=C2=A0 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.=C2=A0 Does anyone know why thi= s 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 atta= chment and I can not
>> >=C2=A0 send it).
>> >
>> > Please note that we use ocaml 4.06.1 and gcc 7.3.0
>> >
>> > Best,
>> >
>> > Ivana
--0000000000009238580577f46d5c--