arm64: insn: Don't fallback on nosync path for general insn patching
authorWill Deacon <will.deacon@arm.com>
Tue, 19 Jun 2018 16:55:28 +0000 (17:55 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 5 Jul 2018 16:24:48 +0000 (17:24 +0100)
commit693350a7998018391852c48f68956cf0f855b2b9
tree7ee50d03fc3ee13994ac7a4d18a8a7af1a8189f6
parent3b8c9f1cdfc506e94e992ae66b68bbe416f89610
arm64: insn: Don't fallback on nosync path for general insn patching

Patching kernel instructions at runtime requires other CPUs to undergo
a context synchronisation event via an explicit ISB or an IPI in order
to ensure that the new instructions are visible. This is required even
for "hotpatch" instructions such as NOP and BL, so avoid optimising in
this case and always go via stop_machine() when performing general
patching.

ftrace isn't quite as strict, so it can continue to call the nosync
code directly.

Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/insn.h
arch/arm64/kernel/insn.c