3 ms·
Interesting problem - what's the shortest C function that takes a pointer to bytes and returns the length of the x86-64 instruction there? (and how many hours w
by matja 6y ago
Interesting problem - what's the shortest C function that takes a pointer to bytes and returns the length of the x86-64 instruction there? (and how many hours would it take to code it)
- loeg 6y agoStart here and minimize as you see fit: https://intelxed.github.io/ref-manual/group__DEC.html#ga4bef6152f61997a47c4e0fe4327a3254 https://intelxed.github.io/ref-manual/group__DEC.html#ga4bef...
- mhh__ 6y agoThe cheating way is probably to do this https://www.blackhat.com/docs/us-17/thursday/us-17-Domas-Breaking-The-x86-ISA.pdf https://www.blackhat.com/docs/us-17/thursday/us-17-Domas-Bre... (page ~71) i.e. shift across an instruction boundary.
- kccqzy 6y agoPut it on a page boundary. Make sure the next page isn't accessible. Analyze the resulting page fault.