| Index: src/trusted/validator_ragel/gen/validator_x86_32.c
|
| ===================================================================
|
| --- src/trusted/validator_ragel/gen/validator_x86_32.c (revision 10976)
|
| +++ src/trusted/validator_ragel/gen/validator_x86_32.c (working copy)
|
| @@ -19,7 +19,7 @@
|
| #include <string.h>
|
|
|
| #include "native_client/src/trusted/validator_ragel/bitmap.h"
|
| -#include "native_client/src/trusted/validator_ragel/unreviewed/validator_internal.h"
|
| +#include "native_client/src/trusted/validator_ragel/validator_internal.h"
|
|
|
| /* Ignore this information: it's not used by security model in IA32 mode. */
|
| #undef GET_VEX_PREFIX3
|
| @@ -30,6 +30,10 @@
|
|
|
|
|
|
|
| +/*
|
| + * The "write data" statement causes Ragel to emit the constant static data
|
| + * needed by the ragel machine.
|
| + */
|
|
|
| static const int x86_32_validator_start = 233;
|
| static const int x86_32_validator_first_final = 233;
|
| @@ -39,7 +43,6 @@
|
|
|
|
|
|
|
| -
|
| Bool ValidateChunkIA32(const uint8_t *data, size_t size,
|
| uint32_t options,
|
| const NaClCPUFeaturesX86 *cpu_features,
|
| @@ -76,7 +79,7 @@
|
| /*
|
| * This option is usually used in tests: we will process the whole chunk
|
| * in one pass. Usually each bundle is processed separately which means
|
| - * instructions (and super-instructions) can not cross borders of the bundle.
|
| + * instructions (and "superinstructions") can not cross borders of the bundle.
|
| */
|
| if (options & PROCESS_CHUNK_AS_A_CONTIGUOUS_STREAM)
|
| end_of_bundle = data + size;
|
| @@ -100,11 +103,19 @@
|
| uint32_t instruction_info_collected = 0;
|
| int current_state;
|
|
|
| + /*
|
| + * The "write init" statement causes Ragel to emit initialization code.
|
| + * This should be executed once before the ragel machine is started.
|
| + */
|
|
|
| {
|
| ( current_state) = x86_32_validator_start;
|
| }
|
|
|
| + /*
|
| + * The "write exec" statement causes Ragel to emit the ragel machine's
|
| + * execution code.
|
| + */
|
|
|
| {
|
| if ( ( current_position) == ( end_of_bundle) )
|
|
|