]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: insn: Don't assume unrecognized HINTs are skippable
authorMark Brown <broonie@kernel.org>
Mon, 4 May 2020 13:13:25 +0000 (14:13 +0100)
committerWill Deacon <will@kernel.org>
Mon, 4 May 2020 15:06:29 +0000 (16:06 +0100)
commit0fc4ba3b109eadbfbc61779021683fea788d3374
treed91a9572b7c4527eaee1b44f519c0bcf4213f778
parentc6bcab8809c35b1061148fd3617f6db12109c2bd
arm64: insn: Don't assume unrecognized HINTs are skippable

Currently the kernel assumes that any HINT which it does not explicitly
recognise is skippable.  This is not robust as new instructions may be
added which need special handling, and in any case software should only
be using explicit NOP instructions for deliberate NOPs.

This has the effect of rendering PAC and BTI instructions unprobeable
which means that probes can't be inserted on the first instruction of
functions built with those features.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20200504131326.18290-4-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/insn.c