summaryrefslogtreecommitdiff
path: root/scripts/sbom/tests/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2026-06-23 22:28:18 +0200
committerWill Deacon <will@kernel.org>2026-06-24 14:52:14 +0100
commit36fa5ffa60344bcc59fb3f50b33af8187e6b8753 (patch)
tree1a8676d774dda3d09dc80c980d6de5a58f0926d7 /scripts/sbom/tests/git@git.tavy.me:linux.git
parent4cc70f75853bebac022334b6a86b953348072f74 (diff)
arm64: mm: Defer read-only remap of data/bss linear alias
Since commit f2ba877402e5 ("arm64: mm: Map the kernel data/bss read-only in the linear map") the linear alias of the .data and .bss regions is remapped read-only early during the boot. (Note that a subsequent patch to unmap this region entirely was reverted just before the v7.2 merge window, and will be brought back in an improved form for the v7.3 cycle) Fuad reports that in some cases, the KVM init code may apply relocations to variables that reside in .data, and does so via the linear map. This means that remapping .data read-only beforehand is a bad idea, and results in an early boot crash. These variables in .data are only present when CONFIG_NVHE_EL2_DEBUG or CONFIG_NVHE_EL2_TRACING are enabled, which is why it was not spotted in testing. So move the remap to mark_rodata_ro(), which is a reasonable place to put this, and ensures that it happens much later during the boot. It also means that rodata=off is now taken into account, and so the linear alias will remain writable in that case. Fixes: f2ba877402e5 ("arm64: mm: Map the kernel data/bss read-only in the linear map") Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Tested-by: Fuad Tabba <fuad.tabba@linux.dev> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'scripts/sbom/tests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions