temporary changes for wp issue
Fixed one issue where the WP system wasn't mangling CMP RBX, (RBX) properly because it wasn't seeing (RBX) as being changeable. Made CMP into a changeable-operand instruction, and added some checking code to detect future cases of similar bugs. Dealing with a new issue now where some instrumented code seems to be returning into what seems to be a patch wrapped bit of code, and is faulting in there. There might also be an issue where an int3 (a gdb breakpoint on a function) is being instrumented and is masking a different kind of problem.
Fixed a minor issue with everything_watched using patch wrappers and full-kernel instrumentation. First, I made it so that patch-wrapped code can be instrumented. This was in response to a GP fault inside of a patch-wrapped function (located in gencode area), so the current WP system wasn't set up to handle such a fault. This helped, but then revealed an issue where search_exception_tables seemed to cause some unusual re-entrancy issues. Anyway, adding that function as a special case to copy only made some progress. Finally, found a funny bug where the the patch-wrapped kmalloc was being used to allocate a kernel_module structure, which was then used by a granary function that isn't meant to be instrumented. Fixing that meant ensuring that the address appears unwatched.