]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: move __end_rodata to cover arch read-only sections
authorNicholas Piggin <npiggin@gmail.com>
Fri, 16 Sep 2022 04:07:49 +0000 (14:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 26 Sep 2022 10:58:16 +0000 (20:58 +1000)
commit206ce6c55a88aa2c5e40249a823b05502644aa17
tree8b534ee44f283a58de7353121e364a7f9e524747
parent41e9ed489bf545b4f113e34c614ce4a1ec159d63
powerpc: move __end_rodata to cover arch read-only sections

powerpc has a number of read-only sections and tables that are put after
RO_DATA(). Move the __end_rodata symbol to cover these as well.

Setting memory to read-only at boot is done using __init_begin, change
that to use __end_rodata.

This makes is_kernel_rodata() exactly cover the read-only region, as
well as other things using __end_rodata (e.g., kernel/dma/debug.c).
Boot dmesg also prints the rodata size more accurately.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220916040755.2398112-2-npiggin@gmail.com
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/mm/book3s32/mmu.c
arch/powerpc/mm/book3s64/hash_pgtable.c
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/mm/pgtable_32.c