backport Kernel monkey patches