Index: src/trusted/validator_ragel/dfa_validate_64.c |
diff --git a/src/trusted/validator_ragel/dfa_validate_64.c b/src/trusted/validator_ragel/dfa_validate_64.c |
index d2d971626bfd37b9064ba7c1b2adbcff002ec47d..f91d36fe95be581edacec83c3c3a303e2dec2f6e 100644 |
--- a/src/trusted/validator_ragel/dfa_validate_64.c |
+++ b/src/trusted/validator_ragel/dfa_validate_64.c |
@@ -30,6 +30,7 @@ static NaClValidationStatus ApplyDfaValidator_x86_64( |
uint8_t *data, |
size_t size, |
int stubout_mode, |
+ uint32_t flags, |
int readonly_text, |
const NaClCPUFeatures *f, |
const struct NaClValidationMetadata *metadata, |
@@ -37,8 +38,10 @@ static NaClValidationStatus ApplyDfaValidator_x86_64( |
/* TODO(jfb) Use a safe cast here. */ |
NaClCPUFeaturesX86 *cpu_features = (NaClCPUFeaturesX86 *) f; |
enum NaClValidationStatus status = NaClValidationFailed; |
- int did_stubout = 0; |
void *query = NULL; |
+ struct StubOutCallbackData callback_data; |
+ callback_data.flags = flags; |
+ callback_data.did_rewrite = 0; |
UNREFERENCED_PARAMETER(guest_addr); |
if (stubout_mode) |
@@ -72,8 +75,8 @@ static NaClValidationStatus ApplyDfaValidator_x86_64( |
status = NaClValidationSucceeded; |
} else { |
if (ValidateChunkAMD64(data, size, 0 /*options*/, cpu_features, |
- NaClDfaStubOutCPUUnsupportedInstruction, |
- &did_stubout)) |
+ NaClDfaStubOutUnsupportedInstruction, |
+ &callback_data)) |
status = NaClValidationSucceeded; |
} |
@@ -82,7 +85,7 @@ static NaClValidationStatus ApplyDfaValidator_x86_64( |
/* Cache the result if validation succeeded and the code was not modified. */ |
if (query != NULL) { |
- if (status == NaClValidationSucceeded && did_stubout == 0) |
+ if (status == NaClValidationSucceeded && callback_data.did_rewrite == 0) |
cache->SetKnownToValidate(query); |
cache->DestroyQuery(query); |
} |