Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: src/trusted/service_runtime/sel_main_chrome.c

Issue 3539011: Enable check for DEP / NX page protection (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Modify windows check to use Noel's signal interface Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/sel_main.c ('k') | src/trusted/service_runtime/web_worker_stub.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/trusted/service_runtime/sel_main.c ('k') | src/trusted/service_runtime/web_worker_stub.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698