On Fri, Aug 16, 2019 at 02:57:43PM +0100, Will Deacon wrote: > 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 (e71a4e1bebaf7 ("arm64: ftrace: add support for far > branches to dynamic ftrace")). Since no instructions were being patched, > no cache maintenance was needed. However, later in be0f272bfc83 ("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@xxxxxxxxxx> > Cc: Catalin Marinas <catalin.marinas@xxxxxxx> > Cc: James Morse <james.morse@xxxxxxx> > Cc: <stable@xxxxxxxxxxxxxxx> > Fixes: be0f272bfc83 ("arm64: ftrace: emit ftrace-mod.o contents through code") > Signed-off-by: Will Deacon <will@xxxxxxxxxx> Queued for 5.3. Thanks. -- Catalin