Next: Self-Modifying Code
Up: Limitations
Previous: Potential buffer overflow attacks
The current implementation doesn't handle multi-threaded applications. An idea to implement the solution for multi-threaded applications, comes from [26]. We can access the Thread Information Block (TIB) structure using the FS segment register. Code generated by compilers to set up exception handlers and to allocate storage for thread local variables, typically reveal this use of the FS register. The TIB contains an array of slots for thread local storage. What we could do is have a separate RAR space for each thread (taking care that RAR spaces of two threads don't bump in to each other), and store the address of the RAR in one of the thread local storage slots, which can be used by the RAD prologue and epilogue code, to figure out which RAR to work with. However, the use of the FS register, although a well-known fact in the Windows world, still falls into the category of undocumented information. There would probably be Win32 API functions, which do something like this, however the cost of invoking an API call at every RAD prologue and epilogue would be prohibitive.
Next: Self-Modifying Code
Up: Limitations
Previous: Potential buffer overflow attacks
Manish Prasad
2003-04-05