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

Unified Diff: src/trusted/service_runtime/sel_main_chrome.c

Issue 9535001: Add validation caching interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: More edits Created 8 years, 10 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/service_runtime/sel_main_chrome.h ('k') | src/trusted/service_runtime/sel_validate_image.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/sel_main_chrome.c
diff --git a/src/trusted/service_runtime/sel_main_chrome.c b/src/trusted/service_runtime/sel_main_chrome.c
index 3047b2b70e3733c73c11c1883141a69955a4ee4b..f57ce99822186013d8aa79f096e6feba9332a4cf 100644
--- a/src/trusted/service_runtime/sel_main_chrome.c
+++ b/src/trusted/service_runtime/sel_main_chrome.c
@@ -38,6 +38,7 @@ int verbosity = 0;
static int g_irt_file_desc = -1;
+static struct NaClValidationCache *g_validation_cache = NULL;
void NaClSetIrtFileDesc(int fd) {
CHECK(g_irt_file_desc == -1);
@@ -77,6 +78,11 @@ static void NaClLoadIrt(struct NaClApp *nap) {
(*NACL_VTBL(Gio, gio_desc)->Dtor)(gio_desc);
}
+/* TODO(ncbray) consolidate Chrome's sel_ldr setup to a single function. */
+void NaClSetValidationCache(struct NaClValidationCache *cache) {
+ g_validation_cache = cache;
+}
+
void NaClMainForChromium(int handle_count, const NaClHandle *handles,
int debug) {
char *av[1];
@@ -112,6 +118,9 @@ void NaClMainForChromium(int handle_count, const NaClHandle *handles,
errcode = LOAD_OK;
+ /* Inject the validation caching interface, if it exists. */
+ nap->validation_cache = g_validation_cache;
+
NaClAppInitialDescriptorHookup(nap);
/*
« no previous file with comments | « src/trusted/service_runtime/sel_main_chrome.h ('k') | src/trusted/service_runtime/sel_validate_image.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698