Skip to content

Commit eb48d15

Browse files
author
Marc Zyngier
committed
arm64: Move .hyp.rodata outside of the _sdata.._edata range
The HYP rodata section is currently lumped together with the BSS, which isn't exactly what is expected (it gets registered with kmemleak, for example). Move it away so that it is actually marked RO. As an added benefit, it isn't registered with kmemleak anymore. Fixes: 380e18a ("KVM: arm64: Introduce a BSS section for use at Hyp") Suggested-by: Catalin Marinas <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: [email protected] #5.13 Acked-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c500bee commit eb48d15

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm64/kernel/vmlinux.lds.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ SECTIONS
181181
/* everything from this point to __init_begin will be marked RO NX */
182182
RO_DATA(PAGE_SIZE)
183183

184+
HYPERVISOR_DATA_SECTIONS
185+
184186
idmap_pg_dir = .;
185187
. += IDMAP_DIR_SIZE;
186188
idmap_pg_end = .;
@@ -260,8 +262,6 @@ SECTIONS
260262
_sdata = .;
261263
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
262264

263-
HYPERVISOR_DATA_SECTIONS
264-
265265
/*
266266
* Data written with the MMU off but read with the MMU on requires
267267
* cache lines to be invalidated, discarding up to a Cache Writeback

0 commit comments

Comments
 (0)