projects/linux·commit eb761a17

powerpc: Fix writable sections being moved into the rodata region

eb761a17 · Nicholas Piggin <[email protected]> · 2022-11-16 14:39:53 +10:00

.data.rel.ro*  catches .data.rel.root_cpuacct, and the kernel crashes on
a store in css_clear_dir. At least we know read-only data protection is
working...

Fixes: b6adc6d6d3272 ("powerpc/build: move .data.rel.ro, .sdata2 to read-only")
Signed-off-by: Nicholas Piggin <[email protected]>
Reviewed-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Commit
eb761a1760bf30cf64e98ee8d914866e62ec9e8a
Parents
02a771c9

Changes

1 files changed · +1 −1

FileStatusAddDelContent
arch/powerpc/kernel/vmlinux.lds.Smodified+1−1View file

arch/powerpc/kernel/vmlinux.lds.S

View file
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 7786e3a..8c3862b 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -142,7 +142,7 @@ SECTIONS
#endif
.data.rel.ro : AT(ADDR(.data.rel.ro) - LOAD_OFFSET) {
- *(.data.rel.ro*)
+ *(.data.rel.ro .data.rel.ro.*)
}
.branch_lt : AT(ADDR(.branch_lt) - LOAD_OFFSET) {