I have some plans to implement kernel aslr on amd64. Actually, a few months
ago I wrote set of patches for the bootloader and the kernel, and also a
complete kernel relocator. As far as I can test, everything works correctly
and reliably; the whole implementation can relocate and jump into a PIE binary
in kernel mode with a proper page tree.
But the thing is, I don't quite see how to have the kernel itself compiled as
PIE. My attempts so far have been unfruitful, so I thought I could ask here.
Ideally, we would have a kernel that has the same binary layout as our kernel
modules.
Is there someone interested in working on that? This is a toolchain work, but
I don't know that stuff.