powerpc: Fix writable sections being moved into the rodata region
Nicholas Piggin
reviewerPATCH 1/1 powerpc: Fix writable sections being moved into the rodata region
.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]>
--- arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/vmlinux.lds.S +1 -1
@@ -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) {
Signature · 1 line
2.37.2
Le 16/11/2022 à 05:39, Nicholas Piggin a écrit :
Quoted 6 lines
.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]>
Quoted 17 lines
--- arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/kernel/vmlinux.lds.S +1
-1@@ -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) {
Michael Ellerman
AppliedQuoted 5 lines · Nicholas Piggin
.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...
Applied to powerpc/fixes.
[1/1] powerpc: Fix writable sections being moved into the rodata region
https://git.kernel.org/powerpc/c/eb761a1760bf30cf64e98ee8d914866e62ec9e8a
cheers