<div dir="ltr">On Wed, Jun 19, 2013 at 12:42 PM, Dmitri Rubinstein <span dir="ltr"><<a href="mailto:dmitri.rubinstein@googlemail.com" target="_blank">dmitri.rubinstein@googlemail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 19.06.2013 18:01, schrieb JF Bastien:<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
     From the provided documentation I understood that in memory data<br>
    structures of a PNaCl program are incompatible to the host program<br>
    because ABIs are different (e.g. PNaCl pointers are always 32-bit<br>
    even when running on x86_64 platform).<br>
    So PNaCl program can't access any data structures of the host<br>
    program directly. The only communication way is by using syscalls,<br>
    but the document does not specify syscalls in detail.<br>
<br>
<br>
We should probably clarify in the final documentation, but the goal of<br>
PNaCl is to not only be portable and fast but also be safe for the user,<br>
and the way this is achieved is through NaCl's SFI. Specifically for<br>
syscalls:<br>
<a href="http://www.chromium.org/nativeclient/reference/anatomy-of-a-sys" target="_blank">http://www.chromium.org/<u></u>nativeclient/reference/<u></u>anatomy-of-a-sys</a><br>
In a way the syscalls offered are defined by the embedding sandbox: NaCl<br>
through Chrome and sel_ldr have documented interfaces, and the NaCl SDK<br>
offers POSIX-like interfaces built on top of these.<br>
</blockquote>
<br></div></div>
But this discussion is about stable bitcode format, or do you want to restrict the set of syscalls on the LLVM level ?<br>
I am interested for my project in having a stable portable bitcode format like the one you propose, but not as a part of a browser and I possibly need to have an extended set of syscalls. The documentation does not provide an example how the syscall is represented in the LLVM bitcode. Is this just a function call ?</blockquote>
<div><br></div><div>Yes - it's just a function call. The system calls are the same for NaCl and PNaCl - they are part of the NaCl ABI but not part of the portable bitcode language.</div><div><br></div><div>Eli</div><div>
<br></div><div><br></div><div><br></div></div></div></div>