[LLVMdev] converting x86 instructions to LLVM instructions

Marius wishinet at googlemail.com
Tue Sep 29 09:05:12 PDT 2009

* Timo Juhani Lindfors (timo.lindfors at iki.fi) wrote:
> Hi,
> Alexandre Gouraud <alexandre.gouraud at enst-bretagne.fr> writes:
> > if it does not already exists, could it mean it is a nonsense, then why?
> Why don't you compile your program directly to LLVM bitcode?
- In security-testing you sometimes apply black boxing. 

I've had a similar idea lately. 

x86 in general for reverse engeneering purposes isn't very useful. 
If you could use LLVM-qemu to get an intermediate representation of a
specific binary and selectively execute functions symbolically, you'd
have a "fuzzer" that reaches code-paths - in any case. That's a much
deeper verification. If you read the KLEE research paper and take a look
at the number of overlooked bugs they were able to identify, this could
be very effective.

I don't know how to modify llvm-qemu to translate x86 to LLVM IL. This
is not trivial: qemu is a very limited "emulation". The "target" x86
won't have MSRs and specific instructions. The abstraction level is
higher. However for unspecific targets it might scale. Marking variables
as symbolic in LLVM bytecode however... 

In any case it would be interesting to be able to translate x86 to LLVM
IR. If somebody want's to give that a try let's make a plan ;).

Have fun,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090929/3c06f420/attachment.sig>

More information about the llvm-dev mailing list