Index: src/trusted/service_runtime/sel_main_chrome.c |
=================================================================== |
--- src/trusted/service_runtime/sel_main_chrome.c (revision 3470) |
+++ src/trusted/service_runtime/sel_main_chrome.c (working copy) |
@@ -25,6 +25,7 @@ |
#include "native_client/src/trusted/service_runtime/nacl_debug.h" |
#include "native_client/src/trusted/service_runtime/nacl_signal.h" |
#include "native_client/src/trusted/service_runtime/sel_ldr.h" |
+#include "native_client/src/trusted/platform_qualify/nacl_dep_qualify.h" |
#include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" |
static int const kSrpcFd = 5; |
@@ -122,6 +123,16 @@ |
NaClErrorString(errcode)); |
} |
+ /* |
+ * Ensure this platform has Data Execution Prevention enabled. |
+ */ |
+ if (!NaClCheckDEP()) { |
+ errcode = LOAD_DEP_UNSUPPORTED; |
+ nap->module_load_status = errcode; |
+ fprintf(stderr, "Error while loading in SelMain: %s\n", |
+ NaClErrorString(errcode)); |
+ } |
+ |
/* Give debuggers a well known point at which xlate_base is known. */ |
StopForDebuggerInit(&state); |