linux-stable/arch
Will Deacon 209479bfff arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side
commit b6143d10d2 upstream.

The initial support for dynamic ftrace trampolines in modules made use
of an indirect branch which loaded its target from the beginning of
a special section (e71a4e1beb ("arm64: ftrace: add support for far
branches to dynamic ftrace")). Since no instructions were being patched,
no cache maintenance was needed. However, later in be0f272bfc ("arm64:
ftrace: emit ftrace-mod.o contents through code") this code was reworked
to output the trampoline instructions directly into the PLT entry but,
unfortunately, the necessary cache maintenance was overlooked.

Add a call to __flush_icache_range() after writing the new trampoline
instructions but before patching in the branch to the trampoline.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: James Morse <james.morse@arm.com>
Cc: <stable@vger.kernel.org>
Fixes: be0f272bfc ("arm64: ftrace: emit ftrace-mod.o contents through code")
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25 10:50:24 +02:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:20:53 +01:00
arc ARC: hide unused function unw_hdr_alloc 2019-07-21 09:04:41 +02:00
arm bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
arm64 arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side 2019-08-25 10:50:24 +02:00
blackfin
c6x
cris
frv
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-05 22:31:25 +02:00
hexagon
ia64 ia64: fix build errors by exporting paddr_to_nid() 2019-06-22 08:16:17 +02:00
m32r
m68k m68k: Add -ffreestanding to CFLAGS 2019-03-23 14:35:21 +01:00
metag
microblaze
mips bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
mn10300
nios2
openrisc
parisc parisc: Fix build of compressed kernel even with debug enabled 2019-08-06 19:05:27 +02:00
powerpc bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
s390 bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
score
sh sh: kernel: hw_breakpoint: Fix missing break in switch statement 2019-08-25 10:50:01 +02:00
sparc bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
tile
um um: Silence lockdep complaint about mmap_sem 2019-07-31 07:28:53 +02:00
unicore32
x86 x86/mm: Use WRITE_ONCE() when setting PTEs 2019-08-25 10:50:03 +02:00
xtensa xtensa: add missing isync to the cpu_reset TLB code 2019-08-25 10:50:04 +02:00
.gitignore
Kconfig