summaryrefslogtreecommitdiffstats
path: root/chrome/nacl
Commit message (Collapse)AuthorAgeFilesLines
* Removed an unused instance variable that was not initialized in the constructor.khorimoto@chromium.org2012-03-281-2/+0
| | | | | | | | | | | CID=103620 BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/9866043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129453 0039d316-1c4b-4281-b951-d872f2087c98
* Reland - Create a database for NaCl validation caching that is shared ↵nduca@google.com2012-03-272-6/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between processes. Originally reverted in 129077 due to perf regression. Followup commit will fix up expectations. http://chromegw.corp.google.com/i/chromium/builders/Linux%20x64/builds/25780 This change primarily entails creating a SyncChannel between sel_ldr and the browser. Queries to the database could be made from any thread inside sel_ldr, so the query mechanism needs to be thread safe. This feature is currently disabled by default, and requires an environment variable to enable. A few changes need to be made before this features is safe and can be enabled, such as making sure each installation has a unique, crypographically secure key. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2515 TEST= Run NaCl w/ NACL_VALIDATION_CACHE=1 Review URL: http://codereview.chromium.org/9796006 TBR=ncbray@chromium.org Review URL: https://chromiumcodereview.appspot.com/9808113 TBR=nduca@google.com Review URL: https://chromiumcodereview.appspot.com/9860020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129082 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 129061 - Create a database for NaCl validation caching that is shared ↵nduca@google.com2012-03-272-107/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | between processes. Reverted due to perf regression, see http://chromegw.corp.google.com/i/chromium/builders/Linux%20x64/builds/25780 This change primarily entails creating a SyncChannel between sel_ldr and the browser. Queries to the database could be made from any thread inside sel_ldr, so the query mechanism needs to be thread safe. This feature is currently disabled by default, and requires an environment variable to enable. A few changes need to be made before this features is safe and can be enabled, such as making sure each installation has a unique, crypographically secure key. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2515 TEST= Run NaCl w/ NACL_VALIDATION_CACHE=1 Review URL: http://codereview.chromium.org/9796006 TBR=ncbray@chromium.org Review URL: https://chromiumcodereview.appspot.com/9808113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129077 0039d316-1c4b-4281-b951-d872f2087c98
* Create a database for NaCl validation caching that is shared between processes.ncbray@chromium.org2012-03-272-6/+107
| | | | | | | | | | | | | | | | | | | This change primarily entails creating a SyncChannel between sel_ldr and the browser. Queries to the database could be made from any thread inside sel_ldr, so the query mechanism needs to be thread safe. This feature is currently disabled by default, and requires an environment variable to enable. A few changes need to be made before this features is safe and can be enabled, such as making sure each installation has a unique, crypographically secure key. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2515 TEST= Run NaCl w/ NACL_VALIDATION_CACHE=1 Review URL: http://codereview.chromium.org/9796006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129061 0039d316-1c4b-4281-b951-d872f2087c98
* Fix handle leak in the NaCl broker process.halyavin@google.com2012-03-261-0/+1
| | | | | | | | | BUG= none TEST= none Review URL: http://codereview.chromium.org/9860001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128953 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: Remove needless use of std::wstring for channel IDsmseaborn@chromium.org2012-03-252-4/+3
| | | | | | | | | | | | | | | The motivation for this is to stop the commit queue from refusing changes to these files that touch lines containing "wstring". :-) This addresses a TODO. BUG=none TEST=nacl_integration Review URL: http://codereview.chromium.org/9839083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128799 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: Make hardware exception handling work on 64-bit Windowsmseaborn@chromium.org2012-03-242-1/+83
| | | | | | | | | | | | | | | | | | In order to support untrusted hardware exception handling on 64-bit Windows, we need to have a 64-bit process attach as a debugger to the 64-bit NaCl loader process, so we extend the NaCl broker process to do this. The new code in nacl_broker_listener.cc for attaching a 64-bit debugger is similar to the 32-bit code in nacl_process_host.cc. I intend to unify the two in a later change. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2651 TEST=run_inbrowser_exception_test in nacl_integration Review URL: https://chromiumcodereview.appspot.com/9835003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128764 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: Allow hardware exception handling to be enabled on Linux and Macmseaborn@chromium.org2012-03-212-3/+6
| | | | | | | | | | | | | | | | | | | | | | On Linux and Mac, enabling exception handling is just a matter of passing a flag through to NaClChromeMainStart(). This change also fixes exception handling on x86-32 Windows, which we broke a while ago when we made the exception handling syscalls conditionally enabled on the NaCl side. Exception handling on x86-64 Windows will require further work to hook up the debug helper process. Because of this, and because x86-32 Windows is not covered by the Chromium trybots, I'm not enabling NaCl's exception handling test for Windows yet. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2651 TEST=run_inbrowser_exception_test in nacl_integration Review URL: http://codereview.chromium.org/9724002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128040 0039d316-1c4b-4281-b951-d872f2087c98
* Fix NaClValidationQueryTest to behave correctly when disable_nacl=1.ncbray@chromium.org2012-03-201-10/+10
| | | | | | | | | | | | | | | | | | This CL attempted to fix it, but accidently compiled the unit test into browser_tests: http://codereview.chromium.org/9721009/ That CL also caused a breakage on the ChromeOS bots due to gtest's handling of ASSERT_EQ(false, ...); and it was reverted: https://chromiumcodereview.appspot.com/9717024/ BUG= http://code.google.com/p/nativeclient/issues/detail?id=2515 TEST= none Review URL: http://codereview.chromium.org/9742003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127641 0039d316-1c4b-4281-b951-d872f2087c98
* Add the first part of Chrome-side support for NaCl validation caching.ncbray@google.com2012-03-174-0/+528
| | | | | | | | | | | | | | | This code injects a validation caching implementation into sel_ldr that hashes all of the data it is given and then queries against a stub database. The stub database returns whatever value is specified in the NACL_VALIDATION_RESULT env var for all validation requests. This code is inactive in Chrome unless NACL_VALIDATION_CACHE=1 is set in the environment. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2515 TEST= unit_tests --gtest_filter=NaClValidationQueryTest* Review URL: https://chromiumcodereview.appspot.com/9553009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127304 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: Switch to using the new extensible startup interfacemseaborn@chromium.org2012-03-151-19/+26
| | | | | | | | | | | | | | | The new interface is C-based so the CreateMemoryObject() callback now takes an int rather than a bool. I have opted to wrap content::MakeSharedMemorySegmentViaIPC() rather than change the types in the "content" tree: arguably NaCl's use of a C interface here should not spill over too far into Chromium's C++ code. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2651 TEST=nacl_integration Review URL: https://chromiumcodereview.appspot.com/9695062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126855 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: Remove declaration of non-existent methodmseaborn@chromium.org2012-03-071-2/+1
| | | | | | | | | BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9592039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125431 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: Cleanup: Get some definitions from header filemseaborn@chromium.org2012-03-021-15/+2
| | | | | | | | | | | | | Remove the duplicated prototypes and typedefs now that we have a NaCl header file to get them from that can be #included from Chromium without conflicts. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2628 TEST=compile Review URL: https://chromiumcodereview.appspot.com/9565046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124685 0039d316-1c4b-4281-b951-d872f2087c98
* Windows Breakpad: Get metadata from chrome.exe instead of chrome.dllmseaborn@chromium.org2012-02-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comments in the code indicate that getting the metadata from chrome.dll in GetCustomInfo() is slow because the DLL might not have loaded at the point where Breakpad is initialised. Getting the metadata from the current module (which is either chrome.exe or nacl64.exe) will be faster since the module is already loaded. This will let us initialise Breakpad on the main thread in a later change. I tested this by adding the following debugging prints: printf("product_version=%ls\n", version_info->product_version().c_str()); printf("product_short_name=%ls\n", version_info->product_short_name().c_str()); printf("is_official_build=%i\n", version_info->is_official_build()); printf("special_build=%ls\n", version_info->special_build().c_str()); This produced the same output before and after the change: product_version=19.0.1041.0 product_short_name=Chromium is_official_build=0 special_build= and it produced the same from nacl64.exe when NaCl was run. These are all the fields of version_info that this code uses. We rename "dll_path" to "exe_path" for clarity. The other use of "dll_path", for IsPerUserInstall(), is safe to change to use chrome.exe's path because this only looks at the directory of the pathname. We change chrome.exe to use the same method (GetModuleFileNameW()) as nacl64.exe for getting the current executable's pathname. BUG=111265 TEST=see above Review URL: https://chromiumcodereview.appspot.com/9404034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122392 0039d316-1c4b-4281-b951-d872f2087c98
* Use nacl_helper_bootstrap from native_client repositorymcgrathr@chromium.org2011-12-064-813/+0
| | | | | | | | | | | | | | | These sources have been moved over to the native_client repository. Remove them from chromium/src altogether and just make the gyp files refer to the native_client stuff. BUG= none TEST= linux still builds R=sehr@google.com Review URL: http://codereview.chromium.org/8800034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113133 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 113074 - Use nacl_helper_bootstrap from native_client repositorymcgrathr@chromium.org2011-12-064-0/+813
| | | | | | | | | | | | | | | | | | These sources have been moved over to the native_client repository. Remove them from chromium/src altogether and just make the gyp files refer to the native_client stuff. BUG= none TEST= linux still builds R=sehr@google.com,noelallen@chromium.org Review URL: http://codereview.chromium.org/8799016 TBR=mcgrathr@chromium.org Review URL: http://codereview.chromium.org/8811002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113078 0039d316-1c4b-4281-b951-d872f2087c98
* Use nacl_helper_bootstrap from native_client repositorymcgrathr@chromium.org2011-12-064-813/+0
| | | | | | | | | | | | | | | These sources have been moved over to the native_client repository. Remove them from chromium/src altogether and just make the gyp files refer to the native_client stuff. BUG= none TEST= linux still builds R=sehr@google.com,noelallen@chromium.org Review URL: http://codereview.chromium.org/8799016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113074 0039d316-1c4b-4281-b951-d872f2087c98
* Remove child_process.h includes from chrome (specifically WaitForDebugger). ↵jam@chromium.org2011-11-301-19/+0
| | | | | | | | | I moved the browser process usage to content. For the NaCl usage, it wasn't working anyways since it wasn't being passed to the process (and if it was, the message box wouldn't work on Windows because of sandbox). When this is needed again, we can figure out a good way of doing it. BUG=98716 Review URL: http://codereview.chromium.org/8686014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112259 0039d316-1c4b-4281-b951-d872f2087c98
* Fix python scripts in src/chrome/maruel@chromium.org2011-11-271-16/+19
| | | | | | | | | | | | | | | | | | | | Make sure that: - shebang is only present for executable files - shebang is #!/usr/bin/env python - __main__ is only present for executable files - file's executable bit is coherent Also fix EOF LF to be only one. Minor python style fixes. TBR=nirnimesh@chromium.org BUG=105108 TEST= Review URL: http://codereview.chromium.org/8680018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111658 0039d316-1c4b-4281-b951-d872f2087c98
* Load mac sandbox definitions from resources instead of the bundle.jochen@chromium.org2011-11-251-2/+3
| | | | | | | | | | | Also, move all mac sandbox unittests to content BUG=90443 TEST=content_unittests Review URL: http://codereview.chromium.org/8589001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111614 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to chrome/common/ and nacl/.avi@chromium.org2011-11-211-1/+1
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8551009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110941 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110361 - NaCl: preallocate shared-memory object on Linux as on MacOSXmcgrathr@chromium.org2011-11-181-43/+27
| | | | | | | | | | | | | | | | | | | Preallocating the shared memory object saves an IPC round trip. It also makes the code path more similar for Linux and Mac. It also lays the groundwork for changing the allocation method later without having to replumb the proxying layer. BUG= http://code.google.com/p/chromium/issues/detail?id=103377 TEST= nacl still works on Linux R=mseaborn@chromium.org,jam@chromium.org Review URL: http://codereview.chromium.org/8513018 TBR=mseaborn@chromium.org Review URL: http://codereview.chromium.org/8598029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110776 0039d316-1c4b-4281-b951-d872f2087c98
* nacl_helper_bootstrap: Reserve correct address space size for ARM, none for ↵mcgrathr@chromium.org2011-11-181-5/+5
| | | | | | | | | | | | | | | | | | x86-64 The address space reservation has only been thoroughly used and tested on x86-32. It's also necessary on ARM, but it needs a different exact amount reserved. For x86-64, the reserved space is not used, so it's a waste of address space to consume a gigabyte for it. BUG= none TEST= nacl_integration R=mseaborn@chromium.org,bradchen@google.com Review URL: http://codereview.chromium.org/8588046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110739 0039d316-1c4b-4281-b951-d872f2087c98
* NaCl: preallocate shared-memory object on Linux as on MacOSXmcgrathr@chromium.org2011-11-161-27/+43
| | | | | | | | | | | | | | | | Preallocating the shared memory object saves an IPC round trip. It also makes the code path more similar for Linux and Mac. It also lays the groundwork for changing the allocation method later without having to replumb the proxying layer. BUG= http://code.google.com/p/chromium/issues/detail?id=103377 TEST= nacl still works on Linux R=mseaborn@chromium.org,jam@chromium.org Review URL: http://codereview.chromium.org/8513018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110361 0039d316-1c4b-4281-b951-d872f2087c98
* Open NaCl IRT file only once at startupmcgrathr@chromium.org2011-11-152-18/+15
| | | | | | | | | | | | | | | | | | | | | | This changes the NaCl startup dance so that the IRT file is opened just once at browser startup. That file descriptor is kept around and passed repeatedly to each NaCl process launched. This ensures that when autoupdate replaces the file on disk with a new version, we continue to use the original file that corresponds to the old browser version that's still running. We also eliminate the cases for not having an IRT file, which is now a hard error (i.e. prevents NaCl launches). It's been a hard requirement for NaCl that the IRT be available since Chromium 14. BUG= http://code.google.com/p/nativeclient/issues/detail?id=1772 TEST= hand-tested in Chromium build on Linux, Mac, and Windows R=brettw@chromium.org Review URL: http://codereview.chromium.org/8397001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110136 0039d316-1c4b-4281-b951-d872f2087c98
* Make nacl_helper easily debuggablemcgrathr@chromium.org2011-11-153-0/+121
| | | | | | | | | | | | | | | | This makes it so that attaching gdb to a nacl_helper process, or using gdb on a core dump from such a process, automatically finds the symbols of the nacl_helper executable and all the shared libraries it uses. The theory of operation and the details are explained in comments in the code. BUG= http://code.google.com/p/chromium/issues/detail?id=103436 TEST= nacl still works, gdb attach on nacl_helper process, or gdb on core file from one, find symbols R=mseaborn@chromium.org,bradchen@google.com Review URL: http://codereview.chromium.org/8491060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110120 0039d316-1c4b-4281-b951-d872f2087c98
* Make nacl_helper_bootstrap load a PIE normally, not the dynamic linker directlymcgrathr@chromium.org2011-11-111-115/+200
| | | | | | | | | | | | | | | | | This makes it more like the way a PIE is normally run when loaded by the kernel. It doesn't rely on the dynamic linker's feature of being run from the command line. It also avoids hard-coding the canonical machine-dependent file name of the dynamic linker. Instead, it just obeys PT_INTERP the same way the kernel would. BUG= none TEST= nacl still works R=mseaborn@chromium.org,bradchen@google.com Review URL: http://codereview.chromium.org/8524015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109734 0039d316-1c4b-4281-b951-d872f2087c98
* Move content_restriction.h and main_function_params.h to ↵jam@chromium.org2011-10-317-13/+14
| | | | | | | | | content/public/common, and put them in the content namespace. BUG=98716 Review URL: http://codereview.chromium.org/8387039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108004 0039d316-1c4b-4281-b951-d872f2087c98
* Expose the sandbox related code through the content API. I did a bit of ↵jam@chromium.org2011-10-295-43/+15
| | | | | | | | | | | | | cleanup while I was doing this. -got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo -got rid of the duplicated code to initialize the broker -since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs. BUG=98716 Review URL: http://codereview.chromium.org/8414020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
* Move ZygoteForkDelegateLinux to content/public/common.jam@chromium.org2011-10-251-151/+0
| | | | | | | BUG=98716 Review URL: http://codereview.chromium.org/8381029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107128 0039d316-1c4b-4281-b951-d872f2087c98
* Add UMA reports for Linux nacl_helper startup statusmcgrathr@chromium.org2011-10-201-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | This extends the Linux Zygote Fork request protocol so the Zygote process can return a UMA histogram enumeration report to be made, along with the PID. In the Zygote process, the ZygoteForkDelegate decides what to report. It gets to choose an initial report to make, which happens on the first fork request that doesn't have its own report to make (as a generic fork for a renderer won't). It also gets to choose a report to make with each individual fork request. We then use this in the NaClForkDelegate to report status about the attempt to start up the nacl_helper process. We both make an initial report, so we can collect this information from every Chrome instance, and make a report repeating the same information on each NaCl process fork request, so that we can correlate the nacl_helper startup success/failure rates with sessions that actually make use of NaCl. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2361 TEST= looked at about:histograms/NaCl R=agl@chromium.org,bradchen@google.com,ncbray@google.com Review URL: http://codereview.chromium.org/8342017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106529 0039d316-1c4b-4281-b951-d872f2087c98
* Create a public header with the child_process_sandbox_support_linux ↵jam@chromium.org2011-10-171-3/+2
| | | | | | | | | | | functions that are used in chrome. Also move everything to the content namespace, now that we have one. This gets rid of the last content/common includes from chrome/renderer and so I've tightened up the DEPS. Also get rid of the webkit_glue versions of the font functions since they weren't used anymore. BUG=98716 Review URL: http://codereview.chromium.org/8319017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105956 0039d316-1c4b-4281-b951-d872f2087c98
* Move content_switches to content\public\common.jam@chromium.org2011-10-131-1/+1
| | | | | | | BUG=98716 Review URL: http://codereview.chromium.org/8277018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105389 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up DEPS rules against content so that not all chrome code can include ↵jam@chromium.org2011-09-301-9/+2
| | | | | | | | | anything from content. I also moved ChromeContentPluginClient to chrome\plugin where it really belongs (i.e. to match what we do with the utility client). Review URL: http://codereview.chromium.org/8095011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103569 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 101577 - Move buildbot_nacl_integration out of chrome/test, step #1rlp@chromium.org2011-09-171-89/+0
| | | | | | | | | | BUG=90905 Review URL: http://codereview.chromium.org/7922020 TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/7932004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101604 0039d316-1c4b-4281-b951-d872f2087c98
* Move buildbot_nacl_integration out of chrome/test, step #1phajdan.jr@chromium.org2011-09-161-0/+89
| | | | | | | BUG=90905 Review URL: http://codereview.chromium.org/7922020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101577 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure that the NaCl 64 bit broker process doesn't hang around if the ↵jam@chromium.org2011-09-132-0/+6
| | | | | | | | | browser process quits unexpectedly. Previously this was done through ChildThread, but we don't use that anymore. TEST=kill browser process while broker is running and see that all nacl64.exe processes are gone Review URL: http://codereview.chromium.org/7877010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100820 0039d316-1c4b-4281-b951-d872f2087c98
* Make the NaCl windows 64 bit binaries not depend on chrome targets. These ↵jam@chromium.org2011-09-127-111/+156
| | | | | | | | | | | | | targets are very simple and used little code from chrome targets. However their dependency on chrome targets was problematic because a lot of code wasn't being built for 64 bit on Windows, and so there were a lot of "dummy" files being added with stub functions and code was also being compiled out in random places for NACL_WIN64. I've made the NaCl 64 bit windows targets self contained. They do use a few files from common, but those files are self-contained. In the future, we could move these to be in the same 64 bit target as the constants from common. However that won't make a maintenance difference since someone could still introduce link dependencies to other files in common. Additionally, since we're not using chrome code anymore, we can avoid having both nacl.exe and nacl.dll. nacl.exe is sufficient, and this saves 1.4MB of uncompresed binaries in the installer. BUG=86322 Review URL: http://codereview.chromium.org/7863024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100767 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up nacl_helper_bootstrap linker scriptmcgrathr@chromium.org2011-09-082-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes the changes from rev 99975, which got reverted because the gyp file didn't have necessary dependencies to make bots' incremental rebuilds rebuild everything they should have. The gyp file got fixed as part of rev 100031. Using linux_syscall_support.h requires having a global variable (for the local errno), which I did not have in my original version. Hence, we now have bss space, where originally I had none at all. This updates the linker script to have a proper data+bss segment. Without this, the text segment winds up both writable and executable, which is generally frowned upon (and requires extra special privileges in some Linux systems). The .note.gnu.build-id section is generated by the linker (given the --build-id option, which the compiler driver passes by default). This normally produces a PT_NOTE header pointing to the section, so do that in our custom linker script too. We also separate out the .rodata section from .text, so that debugging tools examining the binary are not confused about what is and isn't expected to be machine instructions. (This has no effect on the memory image, just on the ELF file.) BUG= none TEST= hand-verified that the build comes out as intended and still works R=bradchen@google.com,mseaborn@chromium.org Review URL: http://codereview.chromium.org/7845026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100238 0039d316-1c4b-4281-b951-d872f2087c98
* Modify the build recipe for nacl_helper_bootstrap to invoke the linker ↵bradchen@google.com2011-09-071-1/+0
| | | | | | | | | | | | | | | explicitly via an action rather than invoking via g++. This addresses build problems that occurred on certain developer machines. Also, modified tools/ld_bfd/ld script to find the loader within the Chrome OS build chroot. Also re-enable the nacl_helper. BUG=92964,nativeclient:480 TEST=nacl_integration tests on bots Review URL: http://codereview.chromium.org/7841008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100031 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 99975 - nacl_helper_bootstrap: Avoid writable text segmentjamesr@chromium.org2011-09-072-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | Using linux_syscall_support.h requires having a global variable (for the local errno), which I did not have in my original version. Hence, we now have bss space, where originally I had none at all. This updates the linker script to have a proper data+bss segment. Without this, the text segment winds up both writable and executable, which is generally frowned upon (and requires extra special privileges in some Linux systems). BUG= none TEST= hand-verified that the build comes out as intended and still works R=bradchen@google.com Review URL: http://codereview.chromium.org/7840012 TBR=mcgrathr@chromium.org Review URL: http://codereview.chromium.org/7841038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99977 0039d316-1c4b-4281-b951-d872f2087c98
* nacl_helper_bootstrap: Avoid writable text segmentmcgrathr@chromium.org2011-09-072-1/+17
| | | | | | | | | | | | | | | | | | | | | Using linux_syscall_support.h requires having a global variable (for the local errno), which I did not have in my original version. Hence, we now have bss space, where originally I had none at all. This updates the linker script to have a proper data+bss segment. Without this, the text segment winds up both writable and executable, which is generally frowned upon (and requires extra special privileges in some Linux systems). BUG= none TEST= hand-verified that the build comes out as intended and still works R=bradchen@google.com Review URL: http://codereview.chromium.org/7840012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99975 0039d316-1c4b-4281-b951-d872f2087c98
* Revert nacl_helper while working out developer build issuesbradchen@google.com2011-09-061-0/+1
| | | | | | | | | | | | | Identical change previously reviewed as 7789006, couldn't commit due to git issues. TBR=jam@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/7839007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99789 0039d316-1c4b-4281-b951-d872f2087c98
* Fix nacl_helper argv bug, re-enable nacl_helper, build on linux except ARM. ↵bradchen@google.com2011-09-051-7/+4
| | | | | | | | | | | | | Previously reviewed as http://codereview.chromium.org/7833017; this time ARM build is disabled. TBR=mcgrathr,mseaborn,evanm BUG=92964,nativeclient:480,95196 TEST=nacl_integration on linux Review URL: http://codereview.chromium.org/7800026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99622 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 99617 - Fix nacl_helper startup bug with command line construction.hbono@chromium.org2011-09-051-4/+7
| | | | | | | | | | | | | | | | | | | Add proper chrome dependencies. Re-enable nacl_helper. BUG=92964,nativeclient:480,95168 TEST=nacl_integration tests on bots Review URL: http://codereview.chromium.org/7833017 TBR=bradchen@google.com Review URL: http://codereview.chromium.org/7779029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99619 0039d316-1c4b-4281-b951-d872f2087c98
* Fix nacl_helper startup bug with command line construction.bradchen@google.com2011-09-051-7/+4
| | | | | | | | | | | | | | | | Add proper chrome dependencies. Re-enable nacl_helper. BUG=92964,nativeclient:480,95168 TEST=nacl_integration tests on bots Review URL: http://codereview.chromium.org/7833017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99617 0039d316-1c4b-4281-b951-d872f2087c98
* Disable nacl_helper while fixing DCHECK issue.bradchen@google.com2011-09-021-0/+2
| | | | | | | | | | | TBR=mcgrathr BUG= TEST= Review URL: http://codereview.chromium.org/7831046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99410 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use NaCl helper when run under Valgrindtimurrrr@chromium.org2011-09-021-1/+3
| | | | | | | | | TBR=bradchen,eugenis TEST=Valgrind bots go greener BUG=95171 Review URL: http://codereview.chromium.org/7792096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99345 0039d316-1c4b-4281-b951-d872f2087c98
* Enable nacl_helper by default.bradchen@google.com2011-09-021-6/+1
| | | | | | | | | | BUG=92964,nativeclient:480 TEST=nacl_integration in chromium bots Review URL: http://codereview.chromium.org/7821021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99319 0039d316-1c4b-4281-b951-d872f2087c98
* Use chain-loading for Linux nacl_helpermcgrathr@chromium.org2011-09-017-51/+631
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 R=bradchen@google.com Review URL: http://codereview.chromium.org/7776034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99089 0039d316-1c4b-4281-b951-d872f2087c98