arm64: Unmap kernel data/bss entirely from the linear map
The linear aliases of the kernel text and rodata are mapped read-only as
well. Given that the contents of these regions are mostly identical to
the version in the loadable image, mapping them read-only is a
reasonable hardening measure.
Data and bss, however, are now also mapped read-only but the contents of
these regions are more likely to contain data that we'd rather not leak.
So let's unmap these entirely in the linear map when the kernel is
running normally.
Only when going into hibernation or waking up from it do these regions
need to be mapped, so take care of this using a PM notifier.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 file changed