Skip to content

Commit

Permalink
Revert 205914 "Disable untrusted exception handling for PNaCl"
Browse files Browse the repository at this point in the history
It looks like NaClBrowserTestPnacl.PnaclExceptionHandlingDisabled is failing on all bots. Here's the failure log:
NaClBrowserTestPnacl.PnaclExceptionHandlingDisabled: 
HTTP server started on 127.0.0.1:59586...
sending server_data: {"host": "127.0.0.1", "port": 59586} (36 bytes)
Xlib:  extension "RANDR" missing on display ":9".
[12210:12210:0612/145646:2107321901:INFO:nacl_browsertest_util.cc(131)] |||| [STARTUP]
[12210:12210:0612/145646:2107342348:INFO:CONSOLE(0)] "NativeClient: NaCl module load failed: manifest: program property 'portable' does not have required key: 'url'.", source: http://127.0.0.1:59586/files/pnacl_exception_handling_disabled.html?pnacl=1 (0)
[12210:12210:0612/145646:2107350315:INFO:nacl_browsertest_util.cc(131)] ||||
[CLIENT_ERROR] nacl_module / test_nexe did not load. Status: DONE / 'NaCl module load failed: manifest: program property 'portable' does not have required key: 'url'.'
[12210:12210:0612/145646:2107350584:INFO:nacl_browsertest_util.cc(131)] ||||
[12210:12210:0612/145646:2107350767:INFO:nacl_browsertest_util.cc(131)] |||| A nexe load error occured, aborting testing.
[12210:12210:0612/145646:2107350837:INFO:nacl_browsertest_util.cc(131)] ||||
[12210:12210:0612/145646:2107351209:INFO:nacl_browsertest_util.cc(131)] |||| [SHUTDOWN] 0 passed, 0 failed, 1 errors
../../chrome/test/nacl/nacl_browsertest_util.cc:254: Failure
Value of: handler.test_passed()
Actual: false
Expected: true
Test failed.

> Disable untrusted exception handling for PNaCl
> 
> BUG= https://code.google.com/p/nativeclient/issues/detail?id=3444
> R=dmichael@chromium.org, jln@chromium.org, mseaborn@chromium.org, thakis@chromium.org, yzshen@chromium.org
> 
> Review URL: https://codereview.chromium.org/15901015

TBR=sehr@chromium.org

Review URL: https://codereview.chromium.org/16844007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205951 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sail@chromium.org committed Jun 12, 2013
1 parent 90310a8 commit 84b8e89
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 196 deletions.
5 changes: 2 additions & 3 deletions chrome/browser/nacl_host/nacl_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ NaClProcessHost::NaClProcessHost(const GURL& manifest_url,
uint32 permission_bits,
bool uses_irt,
bool enable_dyncode_syscalls,
bool enable_exception_handling,
bool off_the_record,
const base::FilePath& profile_directory)
: manifest_url_(manifest_url),
Expand All @@ -198,10 +197,10 @@ NaClProcessHost::NaClProcessHost(const GURL& manifest_url,
#endif
internal_(new NaClInternal()),
weak_factory_(this),
uses_irt_(uses_irt),
enable_exception_handling_(true),
enable_debug_stub_(false),
uses_irt_(uses_irt),
enable_dyncode_syscalls_(enable_dyncode_syscalls),
enable_exception_handling_(enable_exception_handling),
off_the_record_(off_the_record),
profile_directory_(profile_directory),
ipc_plugin_listener_(this),
Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/nacl_host/nacl_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {
uint32 permission_bits,
bool uses_irt,
bool enable_dyncode_syscalls,
bool enable_exception_handling,
bool off_the_record,
const base::FilePath& profile_directory);
virtual ~NaClProcessHost();
Expand Down Expand Up @@ -192,11 +191,12 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate {

scoped_ptr<content::BrowserChildProcessHost> process_;

bool enable_exception_handling_;
bool enable_debug_stub_;

bool uses_irt_;

bool enable_debug_stub_;
bool enable_dyncode_syscalls_;
bool enable_exception_handling_;

bool off_the_record_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ void ChromeRenderMessageFilter::OnLaunchNaCl(
launch_params.permission_bits,
launch_params.uses_irt,
launch_params.enable_dyncode_syscalls,
launch_params.enable_exception_handling,
off_the_record_,
profile_->GetPath());
host->Launch(this, reply_msg, extension_info_map_);
Expand Down
10 changes: 3 additions & 7 deletions chrome/common/nacl_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,19 @@ NaClLaunchParams::NaClLaunchParams()
: render_view_id(0),
permission_bits(0),
uses_irt(false),
enable_dyncode_syscalls(false),
enable_exception_handling(false) {
enable_dyncode_syscalls(false) {
}

NaClLaunchParams::NaClLaunchParams(const std::string& manifest_url_,
int render_view_id_,
uint32 permission_bits_,
bool uses_irt_,
bool enable_dyncode_syscalls_,
bool enable_exception_handling_)
bool enable_dyncode_syscalls_)
: manifest_url(manifest_url_),
render_view_id(render_view_id_),
permission_bits(permission_bits_),
uses_irt(uses_irt_),
enable_dyncode_syscalls(enable_dyncode_syscalls_),
enable_exception_handling(enable_exception_handling_) {
enable_dyncode_syscalls(enable_dyncode_syscalls_) {
}

NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams& l) {
Expand All @@ -46,7 +43,6 @@ NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams& l) {
permission_bits = l.permission_bits;
uses_irt = l.uses_irt;
enable_dyncode_syscalls = l.enable_dyncode_syscalls;
enable_exception_handling = l.enable_exception_handling;
}

NaClLaunchParams::~NaClLaunchParams() {
Expand Down
4 changes: 1 addition & 3 deletions chrome/common/nacl_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ struct NaClStartParams {
struct NaClLaunchParams {
NaClLaunchParams();
NaClLaunchParams(const std::string& u, int r, uint32 p, bool uses_irt,
bool enable_dyncode_syscalls,
bool enable_exception_handling);
bool enable_dyncode_syscalls);
NaClLaunchParams(const NaClLaunchParams& l);
~NaClLaunchParams();

Expand All @@ -78,7 +77,6 @@ struct NaClLaunchParams {
uint32 permission_bits;
bool uses_irt;
bool enable_dyncode_syscalls;
bool enable_exception_handling;
};

} // namespace nacl
Expand Down
1 change: 0 additions & 1 deletion chrome/common/render_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams)
IPC_STRUCT_TRAITS_MEMBER(permission_bits)
IPC_STRUCT_TRAITS_MEMBER(uses_irt)
IPC_STRUCT_TRAITS_MEMBER(enable_dyncode_syscalls)
IPC_STRUCT_TRAITS_MEMBER(enable_exception_handling)
IPC_STRUCT_TRAITS_END()

IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
Expand Down
4 changes: 1 addition & 3 deletions chrome/renderer/pepper/ppb_nacl_private_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ PP_NaClResult LaunchSelLdr(PP_Instance instance,
PP_Bool uses_ppapi,
PP_Bool enable_ppapi_dev,
PP_Bool enable_dyncode_syscalls,
PP_Bool enable_exception_handling,
void* imc_handle) {
nacl::FileDescriptor result_socket;
IPC::Sender* sender = content::RenderThread::Get();
Expand Down Expand Up @@ -108,8 +107,7 @@ PP_NaClResult LaunchSelLdr(PP_Instance instance,
routing_id,
perm_bits,
PP_ToBool(uses_irt),
PP_ToBool(enable_dyncode_syscalls),
PP_ToBool(enable_exception_handling)),
PP_ToBool(enable_dyncode_syscalls)),
&result_socket,
&instance_info.channel_handle,
&instance_info.plugin_pid,
Expand Down
37 changes: 0 additions & 37 deletions chrome/test/data/nacl/nacl_test_data.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -238,43 +238,6 @@
'ppapi_test_lib',
],
},
{
'target_name': 'pnacl_exception_handling_disabled_test',
'type': 'none',
'variables': {
# This tests that nexes produced by translation in the browser are not
# able to use hardware exception handling. Pre-translated nexes are
# not subject to this constraint, so we do not test them.
'enable_x86_32': 0,
'enable_x86_64': 0,
'enable_arm': 0,
'nexe_target': 'pnacl_exception_handling_disabled',
'build_pnacl_newlib': 1,
'nexe_destination_dir': 'nacl_test_data',
'link_flags': [
'-lppapi',
'-lppapi_test_lib',
'-lplatform',
'-lgio',
'-lnacl_exception',
],
'sources': [
'pnacl_exception_handling_disabled/pnacl_exception_handling_disabled.cc',
],
'test_files': [
'pnacl_exception_handling_disabled/pnacl_exception_handling_disabled.html',
],
},
'dependencies': [
'<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
'<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
'<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_exception_lib',
'<(DEPTH)/native_client/tools.gyp:prep_toolchain',
'<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
'<(DEPTH)/ppapi/ppapi_untrusted.gyp:ppapi_cpp_lib',
'ppapi_test_lib',
],
},
# Legacy NaCl PPAPI interface tests being here.
{
'target_name': 'ppapi_ppb_core',
Expand Down

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions chrome/test/nacl/nacl_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,4 @@ IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl,
"pnacl_dyncode_syscall_disabled.html"));
}

IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl,
MAYBE_PNACL(PnaclExceptionHandlingDisabled)) {
RunNaClIntegrationTest(FILE_PATH_LITERAL(
"pnacl_exception_handling_disabled.html"));
}

} // namespace anonymous
3 changes: 0 additions & 3 deletions ppapi/api/private/ppb_nacl_private.idl
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@ interface PPB_NaCl_Private {
* NaCl process. This is true for ABI stable nexes.
* The |enable_dyncode_syscalls| flag indicates whether or not the nexe
* will be able to use dynamic code system calls (e.g., mmap with PROT_EXEC).
* The |enable_exception_handling| flag indicates whether or not the nexe
* will be able to use hardware exception handling.
*/
PP_NaClResult LaunchSelLdr([in] PP_Instance instance,
[in] str_t alleged_url,
[in] PP_Bool uses_irt,
[in] PP_Bool uses_ppapi,
[in] PP_Bool enable_ppapi_dev,
[in] PP_Bool enable_dyncode_syscalls,
[in] PP_Bool enable_exception_handling,
[out] mem_t imc_handle);

/* This function starts the IPC proxy so the nexe can communicate with the
Expand Down
5 changes: 1 addition & 4 deletions ppapi/c/private/ppb_nacl_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* found in the LICENSE file.
*/

/* From private/ppb_nacl_private.idl modified Fri Jun 7 17:01:22 2013. */
/* From private/ppb_nacl_private.idl modified Fri May 17 13:21:13 2013. */

#ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
Expand Down Expand Up @@ -72,16 +72,13 @@ struct PPB_NaCl_Private_1_0 {
* NaCl process. This is true for ABI stable nexes.
* The |enable_dyncode_syscalls| flag indicates whether or not the nexe
* will be able to use dynamic code system calls (e.g., mmap with PROT_EXEC).
* The |enable_exception_handling| flag indicates whether or not the nexe
* will be able to use hardware exception handling.
*/
PP_NaClResult (*LaunchSelLdr)(PP_Instance instance,
const char* alleged_url,
PP_Bool uses_irt,
PP_Bool uses_ppapi,
PP_Bool enable_ppapi_dev,
PP_Bool enable_dyncode_syscalls,
PP_Bool enable_exception_handling,
void* imc_handle);
/* This function starts the IPC proxy so the nexe can communicate with the
* browser. Returns PP_NACL_OK on success, otherwise a result code indicating
Expand Down
16 changes: 7 additions & 9 deletions ppapi/native_client/src/trusted/plugin/nacl_entry_points.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/private/ppb_nacl_private.h"

typedef PP_NaClResult (*LaunchNaClProcessFunc)(
PP_Instance instance,
const char* alleged_url,
PP_Bool uses_irt,
PP_Bool uses_ppapi,
PP_Bool enable_ppapi_dev,
PP_Bool enable_dyncode_syscalls,
PP_Bool enable_exception_handling,
NaClHandle* result_socket);
typedef PP_NaClResult (*LaunchNaClProcessFunc)(PP_Instance instance,
const char* alleged_url,
PP_Bool uses_irt,
PP_Bool uses_ppapi,
PP_Bool enable_ppapi_dev,
PP_Bool enable_dyncode_syscalls,
NaClHandle* result_socket);


extern LaunchNaClProcessFunc launch_nacl_process;
Expand Down
Loading

0 comments on commit 84b8e89

Please sign in to comment.