Chromium Code Reviews| Index: src/trusted/validator_x86/ncvalidate_iter.h |
| =================================================================== |
| --- src/trusted/validator_x86/ncvalidate_iter.h (revision 3655) |
| +++ src/trusted/validator_x86/ncvalidate_iter.h (working copy) |
| @@ -195,6 +195,26 @@ |
| NaClMemorySize sz, |
| NaClValidatorState* state); |
| +/* Validate a segment for dynamic code replacement |
|
bsy
2010/11/11 21:27:21
/*
* comment text starts on this line, not above.
petr
2010/11/12 18:11:06
Done.
|
| + * Checks if code at mbase_old can be replaced with code at mbase_new |
| + * Note that mbase_old was validated when it was inserted originally. |
| + * If validation fails, state->validates_ok will be set to false. |
| + * Parameters: |
| + * mbase_old - The address of the beginning of the code segment to be |
| + * replaced |
| + * mbase_new - The address of the code segment that replaces the old |
| + * segment |
| + * vbase - Virtual address that is associated with both segments |
| + * size - Length of the code segments (the segments must be of the same |
| + * size) |
| + * state - The validator state to use while validating *new* segment |
| + */ |
| +void NaClValidateSegmentPair(uint8_t *mbase_old, |
| + uint8_t *mbase_new, |
| + NaClPcAddress vbase, |
| + size_t size, |
| + struct NaClValidatorState *state); |
| + |
| /* Returns true if the validator hasn't found any problems with the validated |
| * code segments. |
| * Parameters: |