linux/arch/arm64
Will Deacon b6143d10d2 arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side
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>
2019-08-16 17:40:03 +01:00
..
boot arm64: dts: imx8mq: fix SAI compatible 2019-07-23 15:37:31 +08:00
configs ARM: SoC defconfig updates 2019-07-19 17:27:27 -07:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
include arm64: mm: add missing PTE_SPECIAL in pte_mkdevmap on arm64 2019-08-08 18:38:20 +01:00
kernel arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side 2019-08-16 17:40:03 +01:00
kvm ARM: 2019-07-12 15:35:14 -07:00
lib treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mm arm64: Make debug exception handlers visible from RCU 2019-08-02 11:56:01 +01:00
net arm64 updates for 5.3: 2019-07-08 09:54:55 -07:00
xen treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig RISC-V updates for v5.3 2019-07-18 12:26:59 -07:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.platforms ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
Makefile arm64: vdso: Fix Makefile regression 2019-07-31 18:08:47 +01:00