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

Unified Diff: src/trusted/validator/validation_cache.h

Issue 12600034: Provide metadata to validator to allow faster caching. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: First fixes Created 7 years, 9 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/validation_cache.h
diff --git a/src/trusted/validator/validation_cache.h b/src/trusted/validator/validation_cache.h
index 6cb0bb8a5546b5d99f212d6bd71e3fa696a4020b..290519e02cda1151f42c0a3551ba7bf9bb25fb4f 100644
--- a/src/trusted/validator/validation_cache.h
+++ b/src/trusted/validator/validation_cache.h
@@ -7,10 +7,15 @@
#ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_VALIDATION_CACHE_H_
#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_VALIDATION_CACHE_H_
+#include <stddef.h>
+
#include "native_client/src/include/nacl_base.h"
+#include "native_client/src/include/portability.h"
EXTERN_C_BEGIN
+struct NaClValidationMetadata;
+
/*
* This interface allows the validator to query a database of validation results
* while hiding details of how the database is implemented.
@@ -53,6 +58,13 @@ struct NaClValidationCache {
void (*DestroyQuery)(void *query);
};
+/* Helper function for identifying the code being validated. */
+extern void AddCodeIdentity(uint8_t *data,
+ size_t size,
+ const struct NaClValidationMetadata *metadata,
+ struct NaClValidationCache *cache,
+ void *query);
+
EXTERN_C_END
#endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_VALIDATION_CACHE_H_ */

Powered by Google App Engine
This is Rietveld 408576698