Re: [PATCH v7 15/15] arm64: mm: Unmap kernel data/bss entirely from the linear map
"Ard Biesheuvel" <[email protected]> Tue, 09 Jun 2026 08:31:30 +0200
| Newsgroups | org.kernel.vger.linux-sh,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-hardening,org.kernel.vger.linux-kernel,org.kvack.linux-mm,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 9 Jun 2026, at 08:28, Marek Szyprowski wrote: > On 09.06.2026 08:22, Marek Szyprowski wrote: >> On 29.05.2026 17:02, Ard Biesheuvel wrote: >>> From: Ard Biesheuvel <[email protected]> >>> >>> The linear aliases of the kernel text and rodata are also mapped >>> read-only in the linear map. Given that the contents of these regions >>> are mostly identical to the version in the loadable image, mapping them >>> read-only and leaving their contents visible 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. >>> >>> When going into hibernation or waking up from it, these regions need to >>> be mapped, so map the region initially, and toggle the valid bit so >>> map/unmap the region as needed. >>> >>> Doing so is required because pages covering the kernel image are marked >>> as PageReserved, and therefore disregarded for snapshotting by the >>> hibernate logic unless they are mapped. >>> >>> Signed-off-by: Ard Biesheuvel <[email protected]> >> This commit landed in yesterday's linux-next as commit 63e0b6a5b693 >> ("arm64: mm: Unmap kernel data/bss entirely from the linear map"). >> In my tests I found that it breaks booting of RaspberryPi3 and >> RaspberryPi4 boards with the following kernel panic: > One more comment - reverting 63e0b6a5b693 and 53205d56212c (dependent > change) on top of next-20260608 fixes this issue. > Thanks for the report, and for the confirmation that those reverts fix the issue - this was reported here as well: https://lore.kernel.org/all/[email protected]/