

Getting CPUID info in pure Ruby - luu
http://cstrahan.com/2013/07/14/pure-ruby-cpuid-via-ffi.html

======
revelation
Theres nothing pure about this. You are calling external functions that make
none of the guarantees of Ruby.

You might also want to fill the newly allocated memory with int3 (0xcc)
instead of nops, that way you will notice if things are wrong and not slide
into whereever.

------
toxik
This is a good demonstration of FFI, but sadly not at all what the title
implies! Good job though.

------
greenyoda
They really mean "pure Ruby except for the hand-written machine code that does
the real work".

A better title for this article would be: "An exploit for executing arbitrary
machine instructions from Ruby".

