1{{+bindTo:partials.standard_nacl_article}}
2
3<section id="sandbox-internals">
4<span id="sandbox-internals-index"></span><h1 id="sandbox-internals"><span id="sandbox-internals-index"></span>Sandbox Internals</h1>
5<p>The sandbox internals documentation describes implementation details for
6Native Client sandboxing, which is also used by Portable Native
7Client. These details can be useful to reimplement a sandbox, or to
8write assembly code that follows sandboxing rules for Native Client
9(Portable Native Client does not allow platform-specific assembly code).</p>
10<p>As an implementation detail, the Native Client sandboxes described here
11are currently used by Portable Native Client to execute code on the
12corresponding machines in a safe manner. The portable bitcode contained
13in a <strong>pexe</strong> is translated to a machine-specific <strong>nexe</strong> before
14execution. This may change at a point in time: Portable Native Client
15doesn&#8217;t necessarily need these sandboxes to execute code on these
16machines. Note that the Portable Native Client compiler itself is also
17untrusted: it too runs in a Native Client sandbox described below.</p>
18<p>Native Client has sandboxes for:</p>
19<ul class="small-gap">
20<li><a class="reference internal" href="/native-client/reference/sandbox_internals/arm-32-bit-sandbox.html#arm-32-bit-sandbox"><em>ARM 32-bit</em></a>.</li>
21<li>x86-32: the original design is described in <a class="reference external" href="http://research.google.com/pubs/archive/34913.pdf">Native Client: A Sandbox
22for Portable, Untrusted x86 Native Code</a>, the current
23design has changed slightly since then.</li>
24<li><a class="reference internal" href="/native-client/reference/sandbox_internals/x86-64-sandbox.html#x86-64-sandbox"><em>x86-64</em></a>.</li>
25<li>MIPS32, described in the <a class="reference external" href="https://code.google.com/p/nativeclient/issues/attachmentText?id=2275&aid=22750018000&name=native-client-mips-0.4.txt">overview of Native Client for MIPS</a>,
26and <a class="reference external" href="https://code.google.com/p/nativeclient/issues/detail?id=2275">bug 2275</a>.</li>
27</ul>
28</section>
29
30{{/partials.standard_nacl_article}}
31