Fix a whole bunch of UB in the kernel
With this disabling optimizations, enabling debug assertions, using ThinLTO instead of fat LTO and disabling the self_modifying cargo feature all works.
With this disabling optimizations, enabling debug assertions, using ThinLTO instead of fat LTO and disabling the self_modifying cargo feature all works.