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

Side by Side Diff: src/trusted/service_runtime/sel_main.c

Issue 10134056: Refactor the process of choosing validators. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: gyp, extern, formatting Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Simple/secure ELF loader (NaCl SEL). 8 * NaCl Simple/secure ELF loader (NaCl SEL).
9 */ 9 */
10 #include "native_client/src/include/portability.h" 10 #include "native_client/src/include/portability.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 if (LOAD_OK != pq_error) { 512 if (LOAD_OK != pq_error) {
513 errcode = pq_error; 513 errcode = pq_error;
514 nap->module_load_status = pq_error; 514 nap->module_load_status = pq_error;
515 fprintf(stderr, "Error while loading \"%s\": %s\n", 515 fprintf(stderr, "Error while loading \"%s\": %s\n",
516 NULL != nacl_file ? nacl_file 516 NULL != nacl_file ? nacl_file
517 : "(no file, to-be-supplied-via-RPC)", 517 : "(no file, to-be-supplied-via-RPC)",
518 NaClErrorString(errcode)); 518 NaClErrorString(errcode));
519 } 519 }
520 } 520 }
521 521
522 nap->enable_dfa_validator = 0;
523 if (getenv("NACL_DANGEROUS_USE_DFA_VALIDATOR") != NULL) {
524 fprintf(stderr, "DANGER! USING THE UNSTABLE DFA VALIDATOR!\n");
525 nap->enable_dfa_validator = 1;
526 }
527
528 /* Sanity check. */ 522 /* Sanity check. */
529 NaClSignalAssertNoHandlers(); 523 NaClSignalAssertNoHandlers();
530 524
531 if (handle_signals) { 525 if (handle_signals) {
532 NaClSignalHandlerInit(); 526 NaClSignalHandlerInit();
533 } else { 527 } else {
534 /* 528 /*
535 * Patch the Windows exception dispatcher to be safe in the case 529 * Patch the Windows exception dispatcher to be safe in the case
536 * of faults inside x86-64 sandboxed code. The sandbox is not 530 * of faults inside x86-64 sandboxed code. The sandbox is not
537 * secure on 64-bit Windows without this. 531 * secure on 64-bit Windows without this.
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 fflush(stdout); 881 fflush(stdout);
888 882
889 if (handle_signals) NaClSignalHandlerFini(); 883 if (handle_signals) NaClSignalHandlerFini();
890 NaClAllModulesFini(); 884 NaClAllModulesFini();
891 885
892 NaClExit(ret_code); 886 NaClExit(ret_code);
893 887
894 /* Unreachable, but having the return prevents a compiler error. */ 888 /* Unreachable, but having the return prevents a compiler error. */
895 return ret_code; 889 return ret_code;
896 } 890 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698