Future Instruction Set Architecture Extension Kernel Driver for Linux - Manual
Hi and thank you for trying out our driver.
What we set out to do was to implement new instruction opcodes through our driver.
Installation
1. Extract both the test and the driver :
tar xzfv driver-0.5.tgz
tar xzfv test-0.5.tgz
It is recommended not to untar them both to the same folder.
2. Load the driver :
in the driver folder type the following at the prompt as root :
./load.csh
this will compile and load the driver.
Driver Test
To test that the driver compiled and installed succesfully :
1. Enter the test program directory.
2. Compile the test program :
make
3. Run the test program :
./test
The driver outputs kernel messages which can be viewed in the usual places (either using dmesg, or in your system logger).
Usage
The new instructions that are implemented when the driver is loaded are:
1 - Requires input of MODR/M. Also supports SIB, Displacement and Immediate. Further information available in Intel Documentation.
In order to use the new opcodes you will have to use assembler instructions in your C code.
Please see the file test.c for examples of use.
| OPCODE | Mnemonic | Explanation |
| 0F 78 | LE2BE1 | translates reg32 in little endian format to reg32/mem32 in big endian format |
| 0F 79 | LE2BE1 | translates reg32/mem32 in little endian format to reg32 in big endian format |
| 0F 01 C1 | STRCPY | Copies ECX characters from address DS:ESI to address in DS:EDI |
| 0F 01 C2 | STRLEN | Calculates length of string located at DS:ESI. Length is returned in ECX |
| 0F 01 C3 | STRNCMP | Compares the first ECX characters of two strings located at DS:ESI and DS:EDI. If the string segments match, sets EFLAGS.ZF to 1, otherwise clears EFLAGS.ZF. |
| 0F 01 C4 | STRCMP | Compares two null terminated strings located at DS:ESI and DS:EDI. If the strings match, sets EFLAGS.ZF to 1, otherwise clears EFLAGS.ZF. |
F.A.Q.
Q: So does it make coffee ?
A: No.
Q: So what does it do?
A: Emulate a new set of commands that you can now use in your code!
Q: Where's the kitchen sink ?
A: Probably in your kitchen.
Q: Will you take responsibility for this if it breaks something ?
A: Hell No.
Uninstallation
To unload the driver and clean up the compiled files type at the prompt :
./remove.csh
Known bugs:
- On some GCC compilers loading the driver gives 4 warnings, cause is unknown at the moment, driver works fine regardless.