| Index: src/trusted/validator_x86/testdata/32/nop-misses.tf
|
| diff --git a/src/trusted/validator_x86/testdata/32/nop-misses.tf b/src/trusted/validator_x86/testdata/32/nop-misses.tf
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3e58949593510b0049137c38fb362680e2479787
|
| --- /dev/null
|
| +++ b/src/trusted/validator_x86/testdata/32/nop-misses.tf
|
| @@ -0,0 +1,134 @@
|
| +BITS: 32
|
| +OUTCOME: invalid
|
| +
|
| +# The following are examples of input sequences that almost look like
|
| +# predefined nop instruction sequences, but differ by 1, just to show
|
| +# that we do reject them.
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +# This is the correct nop case.
|
| +hex: 66 0f 1f 44 00 00
|
| +
|
| +
|
| +# This is an example where we have incremented the nop by 1.
|
| +asm: nopw 0x1(%eax,%eax,1)
|
| +hex: 66 0f 1f 44 00 01
|
| +nc_out: Undefined instruction
|
| +
|
| +
|
| +# This is the (repeated) correct nop case.
|
| +hex: 66 0f 1f 44 00 00
|
| +
|
| +
|
| +# This is an example where we have decremented the nop by 1.
|
| +asm: data16; .byte 0xf; pop %ds; inc %ebx
|
| +hex: 66 0f 1f 43
|
| +nc_out: Undefined instruction
|
| +
|
| +hex: ff ff
|
| +nc_out: Undefined instruction
|
| +
|
| +
|
| +# This is the (repeated) correct nop case.
|
| +hex: 66 0f 1f 44 00 00
|
| +
|
| +
|
| +# Filler (add) to align block.
|
| +hex: 00 00
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +# This is an example of a different, correct, nop case.
|
| +hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +
|
| +# This is an example where we have incremented the nop by 1.
|
| +asm: data16; data16; data16; data16; data16
|
| +hex: 66 66 66 66 66
|
| +nc_out: Bad prefix usage
|
| +nc_out: Illegal instruction
|
| +
|
| +asm: nopl %cs:0x1000000(%eax,%eax,1);
|
| +hex: 2e 0f 1f 84 00 00 00 00 01
|
| +nc_out: Bad prefix usage
|
| +
|
| +
|
| +# Filler (move) to fill the rest of the block.
|
| +asm: mov $0x7788,%di
|
| +hex: 66 bf 88 77
|
| +
|
| +
|
| +# This is the (repeated) correct nop case.
|
| +hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +
|
| +# This is an example where we have decremented the nop by 1.
|
| +asm: data16; data16; data16; data16; data16
|
| +hex: 66 66 66 66 66
|
| +nc_out: Bad prefix usage
|
| +nc_out: Illegal instruction
|
| +
|
| +hex: 2e 0f 1f 83 ff ff ff ff ff
|
| +nc_out: Bad prefix usage
|
| +
|
| +
|
| +# Filler to realign the decoder.
|
| +hex: 00
|
| +
|
| +
|
| +# Filler (add) to fill the rest of the block.
|
| +asm: add (%eax,%eax,1),%al
|
| +hex: 02 04 00
|
| +
|
| +
|
| +# This is the (repeated) correct nop case.
|
| +hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +
|
| +# This is the list of all nops, just to see if they validate.
|
| +hex: 66 0f 1f 44 00 00
|
| +
|
| +hex: 66 0f 1f 84 00 00 00 00 00
|
| +
|
| +# Filler (add) to fill the rest of the block.
|
| +asm: add (%eax,%eax,1),%al
|
| +hex: 02 04 00
|
| +
|
| +hex: 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +hex: 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +# Filler (2 moves) to fill the rest of the block.
|
| +asm: mov %ax,0x11223344
|
| +hex: 66 a3 44 33 22 11
|
| +
|
| +asm: mov 0x11223344,%al
|
| +hex: a0 44 33 22 11
|
| +
|
| +hex: 66 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +hex: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +# Filler (move, nop) to fill the rest of the block.
|
| +asm: mov %ax,0x11223344
|
| +hex: 66 a3 44 33 22 11
|
| +
|
| +asm: nop
|
| +hex: 90
|
| +
|
| +hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
| +hex: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
|
| +
|
|
|