[go: up one dir, main page]

Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(449)

Issue 105920045: code review 105920045: runtime: add NaCl IRT support for 386.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by jyh
Modified:
11 years, 1 month ago
Reviewers:
CC:
rsc, golang-codereviews, veyron-cls_google.com
Visibility:
Public.

Description

runtime: add NaCl IRT support for 386. Native client system calls are mediated through an "outer sandbox." System calls are invoked through a stub stored in a system call table. They execute in the same address space as the caller, using the caller's stack. However, the system call interface is not part of the NaCl public API, and it is subject to change. The NaCl IRT (for "integrated runtime") is the official, stable API. In fact, the IRT is really just a thin wrapper around the system calls. It changes the function signatures somewhat, but in general there is a 1-1 correspondence with raw syscalls. This change uses the IRT for the runtime. However, we continue to support raw system calls, mainly to support the Go playground. If the IRT is available, we use the IRT function; otherwise, we invoke the raw system call. Since syscalls execute on the caller's stack, we switch to the main m->g0 stack, invoke the system call, then switch back to the original stack. Here's the skeleton of a runtime call. switch to main thread stack if !irt_is_enabled invoke raw syscall else invoke IRT function switch back to original stack The IRT is passed using the Elf aux vector. If it exists, we fetch the IRT function tables, and enable the IRT. This change also sets the linker to decouple the elf address from the file offset. The IRT data segments need to start at 0x10000000 to make room for the IRT at 0xfa00000, resulting in huge executable files if the address and file offset are the same.

Patch Set 1 #

Patch Set 2 : diff -r 2af1cf6a6559 https://code.google.com/p/go #

Patch Set 3 : diff -r 2af1cf6a6559 https://code.google.com/p/go #

Patch Set 4 : diff -r 2699961d1143 https://code.google.com/p/go #

Patch Set 5 : diff -r 38cd9f03739fe6cf029acf00a3d178c696c4399f https://code.google.com/p/go #

Patch Set 6 : diff -r 38cd9f03739fe6cf029acf00a3d178c696c4399f https://code.google.com/p/go #

Patch Set 7 : diff -r 38cd9f03739fe6cf029acf00a3d178c696c4399f https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -6 lines) Patch
M src/cmd/ld/data.c View 1 2 3 4 4 chunks +13 lines, -6 lines 0 comments Download
M src/cmd/ld/lib.c View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3
jyh
Hello rsc@golang.org (cc: golang-codereviews@googlegroups.com, veyron-cls@google.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 7 months ago (2014-06-17 15:56:27 UTC) #1
jyh
Updated to perform entersyscall/exitsyscall on the original stack for most syscalls. The excluded calls are ...
11 years, 7 months ago (2014-06-25 17:59:14 UTC) #2
gobot
11 years, 1 month ago (2014-12-19 05:09:30 UTC) #3
R=close

To the author of this CL:

The Go project has moved to Gerrit Code Review.

If this CL should be continued, please see the latest version of
https://golang.org/doc/contribute.html for instructions on
how to set up Git and the Go project's Gerrit codereview plugin,
and then create a new change with your current code.

If there has been discussion on this CL, please give a link to it
(golang.org/cl/105920045 is best) in the description in your
new CL.

Thanks very much.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b