diff options
author | hamaji@chromium.org <hamaji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-03 04:41:57 +0000 |
---|---|---|
committer | hamaji@chromium.org <hamaji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-03 04:41:57 +0000 |
commit | 1154765f5b5c6a2aefa778fd80d8230c09c39221 (patch) | |
tree | 91ea5446c7c9cead59a13de9e242909df3dc8395 /components/nacl/common | |
parent | 16f013d39846a4dccd918c640dced866b832af10 (diff) | |
download | chromium_src-1154765f5b5c6a2aefa778fd80d8230c09c39221.zip chromium_src-1154765f5b5c6a2aefa778fd80d8230c09c39221.tar.gz chromium_src-1154765f5b5c6a2aefa778fd80d8230c09c39221.tar.bz2 |
Tell nacl_helper to use non SFI mode in HandleForkRequest
Before this patch, we were passing this info by the first IPC
to nacl_helper (NaClProcessMsg_Start). This timing is too late
for seccomp sandbox initialization.
This patch introduces a new process type, nacl-loader-nonsfi.
For now, nacl_helper says it can handle both nacl-loader and
nacl-loader-nonsfi. Once we have splitted nacl_helper into two
binaries, we will probably create two NaClForkDelegate
instances and let each of them to focus on a single process
type.
Also removed uses_nonsfi_mode from NaClStartParams. This is
unnecessary anymore.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3734
TEST=out/Release/browser_tests --gtest_filter='NaCl*' and trybot
R=jln@chromium.org, jochen@chromium.org, mseaborn@chromium.org
Review URL: https://codereview.chromium.org/216603002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/nacl/common')
-rw-r--r-- | components/nacl/common/nacl_messages.h | 1 | ||||
-rw-r--r-- | components/nacl/common/nacl_switches.cc | 7 | ||||
-rw-r--r-- | components/nacl/common/nacl_switches.h | 1 | ||||
-rw-r--r-- | components/nacl/common/nacl_types.cc | 3 | ||||
-rw-r--r-- | components/nacl/common/nacl_types.h | 1 |
5 files changed, 8 insertions, 5 deletions
diff --git a/components/nacl/common/nacl_messages.h b/components/nacl/common/nacl_messages.h index 9f892be..77db201 100644 --- a/components/nacl/common/nacl_messages.h +++ b/components/nacl/common/nacl_messages.h @@ -24,7 +24,6 @@ IPC_STRUCT_TRAITS_BEGIN(nacl::NaClStartParams) IPC_STRUCT_TRAITS_MEMBER(enable_ipc_proxy) IPC_STRUCT_TRAITS_MEMBER(uses_irt) IPC_STRUCT_TRAITS_MEMBER(enable_dyncode_syscalls) - IPC_STRUCT_TRAITS_MEMBER(uses_nonsfi_mode) IPC_STRUCT_TRAITS_END() //----------------------------------------------------------------------------- diff --git a/components/nacl/common/nacl_switches.cc b/components/nacl/common/nacl_switches.cc index f2eb46c..732f0e7 100644 --- a/components/nacl/common/nacl_switches.cc +++ b/components/nacl/common/nacl_switches.cc @@ -39,7 +39,12 @@ const char kNaClGdb[] = "nacl-gdb"; // GDB script to pass to the nacl-gdb debugger at startup. const char kNaClGdbScript[] = "nacl-gdb-script"; -// Value for --type that causes the process to run as a NativeClient loader. +// Value for --type that causes the process to run as a NativeClient loader +// for SFI mode. const char kNaClLoaderProcess[] = "nacl-loader"; +// Value for --type that causes the process to run as a NativeClient loader +// for non SFI mode. +const char kNaClLoaderNonSfiProcess[] = "nacl-loader-nonsfi"; + } // namespace switches diff --git a/components/nacl/common/nacl_switches.h b/components/nacl/common/nacl_switches.h index 51fa7c0..fe06d0d 100644 --- a/components/nacl/common/nacl_switches.h +++ b/components/nacl/common/nacl_switches.h @@ -20,6 +20,7 @@ extern const char kNaClDebugMask[]; extern const char kNaClGdb[]; extern const char kNaClGdbScript[]; extern const char kNaClLoaderProcess[]; +extern const char kNaClLoaderNonSfiProcess[]; } // namespace switches diff --git a/components/nacl/common/nacl_types.cc b/components/nacl/common/nacl_types.cc index 50ea1b8..f7c0888 100644 --- a/components/nacl/common/nacl_types.cc +++ b/components/nacl/common/nacl_types.cc @@ -13,8 +13,7 @@ NaClStartParams::NaClStartParams() enable_debug_stub(false), enable_ipc_proxy(false), uses_irt(false), - enable_dyncode_syscalls(false), - uses_nonsfi_mode(false) { + enable_dyncode_syscalls(false) { } NaClStartParams::~NaClStartParams() { diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h index 4adee9d..84904cc2 100644 --- a/components/nacl/common/nacl_types.h +++ b/components/nacl/common/nacl_types.h @@ -60,7 +60,6 @@ struct NaClStartParams { bool enable_ipc_proxy; bool uses_irt; bool enable_dyncode_syscalls; - bool uses_nonsfi_mode; }; // Parameters sent to the browser process to have it launch a NaCl process. |