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

Unified Diff: src/trusted/validator/x86/ncval_reg_sfi/address_sets.c

Issue 625923004: Delete old x86 validator. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebase master Created 6 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
Index: src/trusted/validator/x86/ncval_reg_sfi/address_sets.c
diff --git a/src/trusted/validator/x86/ncval_reg_sfi/address_sets.c b/src/trusted/validator/x86/ncval_reg_sfi/address_sets.c
deleted file mode 100644
index 3ee2aea86fea61e799678b7f69df7ae1f771a2f8..0000000000000000000000000000000000000000
--- a/src/trusted/validator/x86/ncval_reg_sfi/address_sets.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2012 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
-
- */
-
-/*
- * address_sets.c - Implements a bit set of addresses that is used by branch
- * validation to check if branches are safe.
- */
-
-#include "native_client/src/trusted/validator/x86/ncval_reg_sfi/address_sets.h"
-
-#include "native_client/src/shared/platform/nacl_log.h"
-#include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter.h"
-#include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter_internal.h"
-
-/* To turn on debugging of instruction decoding, change value of
- * DEBUGGING to 1.
- */
-#define DEBUGGING 0
-
-#include "native_client/src/shared/utils/debugging.h"
-
-#include "native_client/src/trusted/validator/x86/ncval_reg_sfi/address_sets_inl.c"
-
-uint8_t NaClAddressSetContains(NaClAddressSet set,
- NaClPcAddress address,
- NaClValidatorState* state) {
- if (NaClCheckAddressRange(address, state)) {
- return set[NaClPcAddressToOffset(address)] & NaClPcAddressToMask(address);
- } else {
- return FALSE;
- }
-}
-
-void NaClAddressSetAdd(NaClAddressSet set, NaClPcAddress address,
- NaClValidatorState* state) {
- NaClAddressSetAddInline(set, address, state);
-}
-
-size_t NaClAddressSetArraySize(NaClMemorySize size) {
- /* Be sure to add an element for partial overlaps. */
- /* TODO(karl) The cast to size_t for the number of elements may
- * cause loss of data. We need to fix this. This is a security
- * issue when doing cross-platform (32-64 bit) generation.
- */
- return (size_t) NaClPcAddressToOffset(size) + 1;
-}
-
-NaClAddressSet NaClAddressSetCreate(NaClMemorySize size) {
- return (NaClAddressSet) calloc(NaClAddressSetArraySize(size),
- sizeof(uint8_t));
-}
-
-void NaClAddressSetDestroy(NaClAddressSet set) {
- free(set);
-}
« no previous file with comments | « src/trusted/validator/x86/ncval_reg_sfi/address_sets.h ('k') | src/trusted/validator/x86/ncval_reg_sfi/address_sets_inl.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698