Understanding and Implementing Kernel Patches