Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16-byte vzeroupper/all are decoded without an error #275

Open
wtfsck opened this issue Jul 15, 2021 · 0 comments
Open

16-byte vzeroupper/all are decoded without an error #275

wtfsck opened this issue Jul 15, 2021 · 0 comments

Comments

@wtfsck
Copy link

wtfsck commented Jul 15, 2021

input:

26262626262626262626262626 0000

2626262626262626262626262626 0000
9090909090

26262626262626262626262626 0F77

2626262626262626262626262626 0F77
90

262626262626262626262626 C5F8 77

26262626262626262626262626 C5F8 77
90

2626262626262626262626 C4C178 77

262626262626262626262626 C4C178 77
90

262626262626262626262626 C5FC 77

26262626262626262626262626 C5FC 77
90

2626262626262626262626 C4C17C 77

262626262626262626262626 C4C17C 77
90

This command:

./xed -64 -ih input

produces this output:

XDIS 0: BINARY    BASE       262626262626262626262626260000 add byte ptr [rax], al
ERROR: INSTR_TOO_LONG Could not decode at offset: 0xf len: 15 PC: 0xf: [262626262626262626262626262600]
XDIS 1e: BINARY    BASE       009090909090             add byte ptr [rax-0x6f6f6f70], dl
XDIS 24: MMX       MMX        262626262626262626262626260F77 emms
ERROR: INSTR_TOO_LONG Could not decode at offset: 0x33 len: 14 PC: 0x33: [2626262626262626262626262626]
XDIS 41: MMX       MMX        0F77                     emms
XDIS 43: NOP       BASE       90                       nop
XDIS 44: AVX       AVX        262626262626262626262626C5F877 vzeroupper
XDIS 53: AVX       AVX        26262626262626262626262626C5F877 vzeroupper
XDIS 63: NOP       BASE       90                       nop
XDIS 64: AVX       AVX        2626262626262626262626C4C17877 vzeroupper
XDIS 73: AVX       AVX        262626262626262626262626C4C17877 vzeroupper
XDIS 83: NOP       BASE       90                       nop
XDIS 84: AVX       AVX        262626262626262626262626C5FC77 vzeroall
XDIS 93: AVX       AVX        26262626262626262626262626C5FC77 vzeroall
XDIS a3: NOP       BASE       90                       nop
XDIS a4: AVX       AVX        2626262626262626262626C4C17C77 vzeroall
XDIS b3: AVX       AVX        262626262626262626262626C4C17C77 vzeroall
XDIS c3: NOP       BASE       90                       nop
# end of text section.
# Errors: 2
#XED3 DECODE STATS
#Total DECODE cycles:        415580
#Total instructions DECODE: 19
#Total tail DECODE cycles:        415580
#Total tail instructions DECODE: 19
#Total cycles/instruction DECODE: 21872.63
#Total tail cycles/instruction DECODE: 21872.63

Note that it decodes 16 bytes as valid instructions.

Also, it only decodes 14 bytes of emms, I would expect it would read 15 bytes before failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant