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

Unified Diff: src/trusted/service_runtime/sel_main.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_ldr.c ('k') | src/trusted/service_runtime/sel_main_chrome.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.c
===================================================================
--- src/trusted/service_runtime/sel_main.c (revision 3470)
+++ src/trusted/service_runtime/sel_main.c (working copy)
@@ -28,6 +28,7 @@
#include "native_client/src/shared/platform/nacl_sync_checked.h"
#include "native_client/src/shared/srpc/nacl_srpc.h"
+#include "native_client/src/trusted/platform_qualify/nacl_dep_qualify.h"
#include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h"
#ifdef NACL_BREAKPAD
@@ -450,6 +451,17 @@
NaClErrorString(errcode));
}
+ /*
+ * Ensure this platform has Data Execution Prevention enabled.
+ */
+ if (!skip_qualification && !NaClCheckDEP()) {
+ errcode = LOAD_DEP_UNSUPPORTED;
+ nap->module_load_status = errcode;
+ fprintf(stderr, "Error while loading \"%s\": %s\n",
+ nacl_file,
+ NaClErrorString(errcode));
+ }
+
if (LOAD_OK == errcode) {
errcode = NaClAppLoadFile((struct Gio *) &gf, nap, check_abi);
if (LOAD_OK != errcode) {
« no previous file with comments | « src/trusted/service_runtime/sel_ldr.c ('k') | src/trusted/service_runtime/sel_main_chrome.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698