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

Unified Diff: src/trusted/sel_universal/sel_universal.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/platform_qualify/win/nacl_dep_qualify.c ('k') | src/trusted/service_runtime/nacl_error_code.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/sel_universal/sel_universal.c
===================================================================
--- src/trusted/sel_universal/sel_universal.c (revision 3470)
+++ src/trusted/sel_universal/sel_universal.c (working copy)
@@ -61,8 +61,8 @@
const char** module_argv;
static const char* kFixedArgs[] = { "-X", "5" };
int pass_debug = 0;
+ int pass_pq_disable = 0;
-
/* Descriptor transfer requires the following. */
NaClNrdAllModulesInit();
@@ -79,7 +79,10 @@
NaClLogIncrVerbosity();
break;
case 'Q':
- /* TODO(cbiffle): disable platform qualification, once it's used here */
+ /* TODO(cbiffle): pass this in the sel_ldr flags portion of the
+ sel_universal commandline options. I.e., fix scons invocations
+ etc. so that we don't need this special case here */
+ pass_pq_disable = 1;
break;
default:
fputs(kUsage, stderr);
@@ -125,7 +128,7 @@
* Prepend the fixed arguments to the command line.
*/
sel_ldr_argv =
- (const char**) malloc((pass_debug + sel_ldr_argc
+ (const char**) malloc((pass_debug + pass_pq_disable + sel_ldr_argc
+ NACL_ARRAY_SIZE(kFixedArgs)) *
sizeof(*sel_ldr_argv));
for (n = 0; n < NACL_ARRAY_SIZE(kFixedArgs); ++n) {
@@ -137,13 +140,17 @@
if (pass_debug) {
sel_ldr_argv[sel_ldr_argc + NACL_ARRAY_SIZE(kFixedArgs)] = "-d";
}
+ if (pass_pq_disable) {
+ sel_ldr_argv[sel_ldr_argc + NACL_ARRAY_SIZE(kFixedArgs) + pass_debug] =
+ "-Q";
+ }
/*
* Start sel_ldr with the given application and arguments.
*/
launcher = NaClSelLdrStart(application_name,
5,
- (pass_debug + sel_ldr_argc
+ (pass_debug + pass_pq_disable + sel_ldr_argc
+ NACL_ARRAY_SIZE(kFixedArgs)),
(const char**) sel_ldr_argv,
module_argc,
« no previous file with comments | « src/trusted/platform_qualify/win/nacl_dep_qualify.c ('k') | src/trusted/service_runtime/nacl_error_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698