Re: [PATCH v7 15/15] arm64: mm: Unmap kernel data/bss entirely from the linear map
Marek Szyprowski <[email protected]> Tue, 9 Jun 2026 08:28:35 +0200
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.arm.kernel,gmane.linux.kernel,gmane.linux.kernel.mm,gmane.linux.ports.ppc64.devel |
|---|---|
| Message-ID | <[email protected]> |
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. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland