This replaces the nacl_helper_bootstrap program, dynamically-linked against
nacl_helper.so, with a standalone, statically-linked nacl_helper_bootstrap
program that loads the dynamic linker, instructing it in turn to load the
nacl_helper program (now a PIE rather than a DSO).
This avoids two problems with the old scheme:
1. The nacl_helper_bootstrap program remained in the dynamic linker's
list of loaded objects, as the main executable, even though the
memory where its .dynamic section had been was overwritten with
the NaCl untrusted address space. Code that traverses the list of
all loaded objects could thus attempt to look at pointers into this
part of memory, and be led astray.
2. nacl_helper_bootstrap's large (~1G) bss segment could cause the kernel
to refuse to load the program because it didn't think there was enough
free memory in the system for so large an allocation of anonymous memory.
The bootstrap program is kept very small by avoiding all use of libc
(except for memset and integer division routines needed on ARM). It has
its own custom start-up code hand-written in assembly and its own custom
system call stubs done with hand-written GCC inline asm statements.
To avoid the second problem, the bootstrap program no longer has a large
bss. Instead, it has a special ELF segment (i.e. PT_LOAD header) that
specifies no memory access, and a large (~1G) mapping size from the file.
This mapping is way off the end of the file, but the kernel doesn't mind
that, and since it's all a file mapping, the kernel does not do its normal
memory accounting for consuming a large amount of anonymous memory.
Unfortunately, it's impossible to get the linker to produce exactly the
right PT_LOAD header by itself. Using a custom linker script, we get the
layout exactly how we want it and a PT_LOAD header that is almost right.
We then use a build-time helper program to munge one field of the PT_LOAD
to make it exactly what we need.
BUG= http://code.google.com/p/chromium/issues/detail?id=94147
TEST= hand-tested chromium build, invoked with --nacl-linux-helper
R=bradchen@google.com,mseaborn@chromium.org
Review URL: http://codereview.chromium.org/7795010
git-svn-id: http://src.chromium.org/svn/trunk/src/build@98909 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Clean up SSL false start blacklist code. Numerous changes, including:
* Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome.
* Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them.
* Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety.
* Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation).
* Avoid #define and "using".
* Use standard algorithms for similar reasons as using string ops.
* Use file_util functions to significantly abbreviate file reading/writing code.
* Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue).
* Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate.
* Convert non-error uses of stderr to the chrome-standard VLOG(1).
* Correctly handle hostnames with trailing dots in the input file.
* In general, shorten code where possible.
Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7804001
git-svn-id: http://src.chromium.org/svn/trunk/src/build@98885 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This tool simulates the GPU demands of Chromium's GPU-accelerated compositor. In
the current version, we simulate the performance of the existing forward
rendering model; coming changes will prototype a new model.
BUG=None
TEST=self
This is http://codereview.chromium.org/7718020/ with trivial fixes
Original change by Joshua Trask <joshtrask@google.com>
Review URL: http://codereview.chromium.org/7792002
Patch from Joshua Trask <joshtrask@google.com>.
git-svn-id: http://src.chromium.org/svn/trunk/src/build@98706 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
We were using .dlls, but the .pak files are smaller and this will
allow us to share more code across platforms.
- Remove app/locales.gyp (used on win to generate the locale
dlls) and references to it in other gyp(i) files.
- Update various packaging scripts.
- Move functions from resource_bundle_posix.cc to
resource_bundle.cc (LoadResourcesDataPak, UnloadLocaleResources,
GetLocalizedString, LoadLocaleResources) and delete the
corresponding functions from resource_bundle_win.cc.
Fixes from previous patch:
- Made dependencies of packed_resources explicit (MSVS can't figure
it out from the inputs).
- Removed a couple cases where we were looking for dlls on Windows
(in l10n_util.cc and l10n_util_unittest.cc).
BUG=92724
TBR=cpu
Review URL: http://codereview.chromium.org/7714028TBR=tony@chromium.org
Review URL: http://codereview.chromium.org/7744053TBR=battre@chromium.org
Review URL: http://codereview.chromium.org/7759001
git-svn-id: http://src.chromium.org/svn/trunk/src/build@98427 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
We were using .dlls, but the .pak files are smaller and this will
allow us to share more code across platforms.
- Remove app/locales.gyp (used on win to generate the locale
dlls) and references to it in other gyp(i) files.
- Update various packaging scripts.
- Move functions from resource_bundle_posix.cc to
resource_bundle.cc (LoadResourcesDataPak, UnloadLocaleResources,
GetLocalizedString, LoadLocaleResources) and delete the
corresponding functions from resource_bundle_win.cc.
Fixes from previous patch:
- Made dependencies of packed_resources explicit (MSVS can't figure
it out from the inputs).
- Removed a couple cases where we were looking for dlls on Windows
(in l10n_util.cc and l10n_util_unittest.cc).
BUG=92724
TBR=cpu
Review URL: http://codereview.chromium.org/7714028TBR=tony@chromium.org
Review URL: http://codereview.chromium.org/7744053
git-svn-id: http://src.chromium.org/svn/trunk/src/build@98426 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
We were using .dlls, but the .pak files are smaller and this will
allow us to share more code across platforms.
- Remove app/locales.gyp (used on win to generate the locale
dlls) and references to it in other gyp(i) files.
- Update various packaging scripts.
- Move functions from resource_bundle_posix.cc to
resource_bundle.cc (LoadResourcesDataPak, UnloadLocaleResources,
GetLocalizedString, LoadLocaleResources) and delete the
corresponding functions from resource_bundle_win.cc.
Fixes from previous patch:
- Made dependencies of packed_resources explicit (MSVS can't figure
it out from the inputs).
- Removed a couple cases where we were looking for dlls on Windows
(in l10n_util.cc and l10n_util_unittest.cc).
BUG=92724
TBR=cpu
Review URL: http://codereview.chromium.org/7714028
git-svn-id: http://src.chromium.org/svn/trunk/src/build@98103 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Fourth attempt:
Switching IRT to be built inside the chrome build. Dropping the IRT download
step from the DEPS. Step3 of a many step plan to switch where ppapi + irt
are built.
Dropping download_nacl_irt because we no longer rely on a prebuilt copy.
Dropping irt download drop source tarball (assume people using it will have
to download / build their own nacl toolchain).
Old Review URL: http://codereview.chromium.org/7669058
Review URL: http://codereview.chromium.org/7701017
git-svn-id: http://src.chromium.org/svn/trunk/src/build@97987 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Client loader processes.
Some plug-ins depend on having an executable heap. They write code to data
pages and attempt to execute it without calling mprotect to mark this code
as executable.
Native Client needs to allocate a contiguous 1GB of address space. ASLR may
interfere with there being a "hole" this large in the address space by the
time NaCl makes its request.
Non-executable heaps are only available in 10.7 and later for 32-bit
processes.
PIE/ASLR was formerly disabled for all processes other than the browser
process. This change reenables it for all processes other than the NaCl
loader. PIE/ASLR is available on 10.5 and later, although the implementation
is stronger in 10.7 than in earlier releases.
This change results in two new helpers in addition to the existing
Chromium Helper.app: Chromium Helper EH.app (for executable heaps) and
Chromium Helper NP.app (for no PIE). libplugin_carbon_interpose.dylib moves
out of the helper .app and directly into the versioned directory. The
InfoPlist.strings have been removed from the helper app, but empty .lproj
directories remain.
BUG=90221, 93551
TEST=everything
Review URL: http://codereview.chromium.org/7714018
git-svn-id: http://src.chromium.org/svn/trunk/src/build@97984 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
We were using .dlls, but the .pak files are smaller and this will
allow us to share more code across platforms.
- Remove app/locales.gyp (used on win to generate the locale dlls) and references to it in other gyp(i) files.
- Update various packaging scripts.
- Move functions from resource_bundle_posix.cc to resource_bundle.cc (LoadResourcesDataPak, UnloadLocaleResources, GetLocalizedString, LoadLocaleResources) and delete the corresponding functions from resource_bundle_win.cc.
BUG=92724
Review URL: http://codereview.chromium.org/7677004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@97941 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Add a protoc.gypi that can be gyp-included into any gyp file that
wants to build .proto files.
- Convert two remoting gyp files to use this new protoc.gypi.
(Also fixes a bug in one of those remoting gyp files; a mistaken path
was causing it to always rebuild under Xcode.)
Review URL: http://codereview.chromium.org/7621073
git-svn-id: http://src.chromium.org/svn/trunk/src/build@97366 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Hardlink from different dir for chrome.exe caused annoyance when running from
Visual Studio because $(TargetPath) the default in the .user file is not the
correct path. So, instead do the hardlink on the dll. To avoid the possible
expense on non-NTFS, and to enable a trybot in the future, do this hardlink
based on a gyp define.
BUG=92528, 92685
TEST=No link problems
Review URL: http://codereview.chromium.org/7670031
git-svn-id: http://src.chromium.org/svn/trunk/src/build@97341 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is the first phase towards being able to replace Bookmark Editor with the WebUI Bookmark Manager as part of the GTK removal effort on ChromeOS. It does not yet have a means of selecting a folder to bookmark all of your tabs in and as such can't yet replace all calls to BookmarkEditor::Show.
BUG=None
TEST=Tested editing bookmarks from the popup bubble and bookmark bar in Linux and TouchUI builds.
Review URL: http://codereview.chromium.org/7572022
git-svn-id: http://src.chromium.org/svn/trunk/src/build@97186 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This target generates the locale .pak files on Windows. Since nothing
depends on this target, it doesn't build by default (they're not used
yet).
Specific changes:
- Have locale_settings_win.grd generate .pak files.
- Use pymod_do_main to avoid some shell escaping problems (and it's a bit
faster).
- Rewrite repack_locales.py to work with pymod_do_main.
BUG=92724
Review URL: http://codereview.chromium.org/7648001
git-svn-id: http://src.chromium.org/svn/trunk/src/build@97012 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Includes code for the driver itself. Also modifies the browser process as well as service process to register Apple Event handlers. Also changes the service process to allow registration of driver.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7485011
git-svn-id: http://src.chromium.org/svn/trunk/src/build@96825 4ff67af0-8c30-449e-8e8b-ad334ec8d88c