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

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

Issue 1234393005: A mechanism to identify/forbid/"rewrite" non-temporal instructions (and other) (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Renaming Created 5 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2013 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 #include "native_client/src/trusted/service_runtime/sys_memory.h" 7 #include "native_client/src/trusted/service_runtime/sys_memory.h"
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 722 }
723 723
724 /* Ask validator / validation cache */ 724 /* Ask validator / validation cache */
725 NaClMetadataFromNaClDescCtor(&metadata, ndp); 725 NaClMetadataFromNaClDescCtor(&metadata, ndp);
726 validator_status = NACL_FI("MMAP_FORCE_MMAP_VALIDATION_FAIL", 726 validator_status = NACL_FI("MMAP_FORCE_MMAP_VALIDATION_FAIL",
727 (*nap->validator-> 727 (*nap->validator->
728 Validate)(usraddr, 728 Validate)(usraddr,
729 (uint8_t *) image_sys_addr, 729 (uint8_t *) image_sys_addr,
730 length, 730 length,
731 0, /* stubout_mode: no */ 731 0, /* stubout_mode: no */
732 nap->pnacl_mode,
732 1, /* readonly_text: yes */ 733 1, /* readonly_text: yes */
733 nap->cpu_features, 734 nap->cpu_features,
734 &metadata, 735 &metadata,
735 nap->validation_cache), 736 nap->validation_cache),
736 NaClValidationFailed); 737 NaClValidationFailed);
737 NaClLog(3, "NaClSysMmap: prot_exec, validator_status %d\n", 738 NaClLog(3, "NaClSysMmap: prot_exec, validator_status %d\n",
738 validator_status); 739 validator_status);
739 NaClMetadataDtor(&metadata); 740 NaClMetadataDtor(&metadata);
740 741
741 if (NaClValidationSucceeded == validator_status) { 742 if (NaClValidationSucceeded == validator_status) {
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 size_t length, 1366 size_t length,
1366 int prot) { 1367 int prot) {
1367 struct NaClApp *nap = natp->nap; 1368 struct NaClApp *nap = natp->nap;
1368 1369
1369 NaClLog(3, "Entered NaClSysMprotect(0x%08"NACL_PRIxPTR", " 1370 NaClLog(3, "Entered NaClSysMprotect(0x%08"NACL_PRIxPTR", "
1370 "0x%08"NACL_PRIxPTR", 0x%"NACL_PRIxS", 0x%x)\n", 1371 "0x%08"NACL_PRIxPTR", 0x%"NACL_PRIxS", 0x%x)\n",
1371 (uintptr_t) natp, (uintptr_t) start, length, prot); 1372 (uintptr_t) natp, (uintptr_t) start, length, prot);
1372 1373
1373 return NaClSysMprotectInternal(nap, start, length, prot); 1374 return NaClSysMprotectInternal(nap, start, length, prot);
1374 } 1375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698