aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/mm/book3s64/hash_pgtable.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2022-09-16 14:07:49 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-26 20:58:16 +1000
commit7082f8e7d2276575a8806370007cbb4a7b9abdce (patch)
tree8b534ee44f283a58de7353121e364a7f9e524747 /arch/powerpc/mm/book3s64/hash_pgtable.c
parentpowerpc/vmlinux.lds: Add an explicit symbol for the SRWX boundary (diff)
downloadwireguard-linux-7082f8e7d2276575a8806370007cbb4a7b9abdce.tar.xz
wireguard-linux-7082f8e7d2276575a8806370007cbb4a7b9abdce.zip
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
Diffstat (limited to 'arch/powerpc/mm/book3s64/hash_pgtable.c')
-rw-r--r--arch/powerpc/mm/book3s64/hash_pgtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/book3s64/hash_pgtable.c b/arch/powerpc/mm/book3s64/hash_pgtable.c
index ae008b9df0e6..28332001bd87 100644
--- a/arch/powerpc/mm/book3s64/hash_pgtable.c
+++ b/arch/powerpc/mm/book3s64/hash_pgtable.c
@@ -541,7 +541,7 @@ void hash__mark_rodata_ro(void)
unsigned long start, end, pp;
start = (unsigned long)_stext;
- end = (unsigned long)__init_begin;
+ end = (unsigned long)__end_rodata;
pp = htab_convert_pte_flags(pgprot_val(PAGE_KERNEL_ROX), HPTE_USE_KERNEL_KEY);