]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit546f44f7eed2798b70dab3c6fc1065adcbcaaf8d
tree7ee50d03fc3ee13994ac7a4d18a8a7af1a8189f6
parent47c566802c605a2d346d68842962285a6398f7b7
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