Skip to content

Commit

Permalink
powerpc: Fix writable sections being moved into the rodata region
Browse files Browse the repository at this point in the history
.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: b6adc6d ("powerpc/build: move .data.rel.ro, .sdata2 to read-only")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221116043954.3307852-1-npiggin@gmail.com
  • Loading branch information
npiggin authored and mpe committed Nov 16, 2022
1 parent 02a771c commit eb761a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit eb761a1

Please sign in to comment.