linux/arch/powerpc
Jordan Niethe 71a5b3db9f powerpc/lib/code-patching: Set up Strict RWX patching earlier
setup_text_poke_area() is a late init call so it runs before
mark_rodata_ro() and after the init calls. This lets all the init code
patching simply write to their locations. In the future, kprobes is
going to allocate its instruction pages RO which means they will need
setup_text__poke_area() to have been already called for their code
patching. However, init_kprobes() (which allocates and patches some
instruction pages) is an early init call so it happens before
setup_text__poke_area().

start_kernel() calls poking_init() before any of the init calls. On
powerpc, poking_init() is currently a nop. setup_text_poke_area() relies
on kernel virtual memory, cpu hotplug and per_cpu_areas being setup.
setup_per_cpu_areas(), boot_cpu_hotplug_init() and mm_init() are called
before poking_init().

Turn setup_text_poke_area() into poking_init().

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Russell Currey <ruscur@russell.cc>
[mpe: Fold in missing prototype for poking_init() from lkp]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210609013431.9805-3-jniethe5@gmail.com
2021-06-21 21:13:20 +10:00
..
boot powerpc/boot: add zImage.lds to targets 2021-06-21 21:13:19 +10:00
configs powerpc/Makefile: Add ppc32/ppc64_randconfig targets 2021-05-23 20:51:35 +10:00
crypto crypto: powepc/sha1 - remove unneeded semicolon 2021-03-07 15:13:14 +11:00
include powerpc/lib/code-patching: Set up Strict RWX patching earlier 2021-06-21 21:13:20 +10:00
kernel powerpc/security: Add a security feature for STF barrier 2021-06-21 21:13:19 +10:00
kexec powerpc/kexec_file: Use current CPU info while setting up FDT 2021-05-04 22:26:57 +10:00
kvm Merge branch 'topic/ppc-kvm' into next 2021-06-17 16:51:38 +10:00
lib powerpc/lib/code-patching: Set up Strict RWX patching earlier 2021-06-21 21:13:20 +10:00
math-emu powerpc/math: Fix missing __user qualifier for get_user() and other sparse warnings 2021-03-29 13:22:12 +11:00
mm powerpc/mm: Implement set_memory() routines 2021-06-21 21:13:20 +10:00
net powerpc/ebpf32: Use _Rx macros instead of __REG_Rx ones 2021-06-16 00:16:48 +10:00
perf powerpc: make stack walking KASAN-safe 2021-06-17 00:09:11 +10:00
platforms powerpc/pesries: Get STF barrier requirement from H_GET_CPU_CHARACTERISTICS 2021-06-21 21:13:19 +10:00
purgatory powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S 2021-04-08 21:17:43 +10:00
sysdev Merge branch 'akpm' (patches from Andrew) 2021-04-30 14:38:01 -07:00
tools
xmon powerpc: Don't use 'struct ppc_inst' to reference instruction location 2021-06-17 00:09:00 +10:00
Kbuild
Kconfig powerpc/mm: Implement set_memory() routines 2021-06-21 21:13:20 +10:00
Kconfig.debug powerpc: iommu: fix build when neither PCI or IBMVIO is set 2021-04-08 21:17:46 +10:00
Makefile powerpc/Makefile: Add ppc32/ppc64_randconfig targets 2021-05-23 20:51:35 +10:00
Makefile.postlink