android_kernel_oneplus_msm8998/arch/powerpc
Christophe Leroy 5f3cf6b822 powerpc/lib: fix book3s/32 boot failure due to code patching
commit b45ba4a51cde29b2939365ef0c07ad34c8321789 upstream.

Commit 51c3c62b58b3 ("powerpc: Avoid code patching freed init
sections") accesses 'init_mem_is_free' flag too early, before the
kernel is relocated. This provokes early boot failure (before the
console is active).

As it is not necessary to do this verification that early, this
patch moves the test into patch_instruction() instead of
__patch_instruction().

This modification also has the advantage of avoiding unnecessary
remappings.

Fixes: 51c3c62b58b3 ("powerpc: Avoid code patching freed init sections")
Cc: stable@vger.kernel.org # 4.13+
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-16 19:45:18 +02:00
..
boot powerpc: Fix COFF zImage booting on old powermacs 2019-01-13 10:05:31 +01:00
configs powerpc updates for 4.4 2015-11-05 23:38:43 -08:00
crypto crypto: powerpc/md5 - use md5 IV MD5_HX instead of their raw value 2015-05-18 12:20:20 +08:00
include powerpc/booke64: set RI in default MSR 2019-05-16 19:45:18 +02:00
kernel powerpc/64s: Include cpu header 2019-05-16 19:45:16 +02:00
kvm powerpc/fsl: Emulate SPRN_BUCSR register 2019-05-16 19:44:53 +02:00
lib powerpc/lib: fix book3s/32 boot failure due to code patching 2019-05-16 19:45:18 +02:00
math-emu
mm powerpc/fsl: Flush the branch predictor at each kernel entry (64bit) 2019-05-16 19:44:50 +02:00
net powerpc/bpf/jit: Fix 32-bit JIT for seccomp_data access 2018-05-30 07:49:00 +02:00
oprofile powerpc: Remove mtmsrd(), use existing mtmsr() 2015-07-13 15:47:28 +10:00
perf powerpc/perf: Fix kernel address leak via sampling registers 2018-05-30 07:49:10 +02:00
platforms powerpc/powernv: Query firmware for count cache flush settings 2019-05-16 19:44:50 +02:00
sysdev powerpc: Fix size calculation using resource_size() 2018-09-15 09:40:39 +02:00
xmon powerpc/64s: Improve RFI L1-D cache flush fallback 2019-05-16 19:44:44 +02:00
Kconfig powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E 2019-05-16 19:44:49 +02:00
Kconfig.debug powerpc: Make STRICT_MM_TYPECHECKS a config option 2015-05-11 19:53:59 +10:00
Makefile powerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU 2015-10-19 19:51:18 +11:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00