Changes necessary to make Granary and watchpoints work in the kernel.