mbox series

[v2,0/3] arm64: Make NOP handling a whitelist

Message ID 20200428172433.48830-1-broonie@kernel.org (mailing list archive)
Headers show
Series arm64: Make NOP handling a whitelist | expand

Message

Mark Brown April 28, 2020, 5:24 p.m. UTC
Currently we default to assuming any unrecognized instruction in the
hint space can be safely handled as a NOP.  This is not robust and any
code that really wants a NOP should be using the explicitly defined NOP
so let's instead invert this and whitelist those instructions which it
is safe to handle as NOPs.

Patch 2 adds defines for the HINTs for BTI landing pads which will be
used by the in-kernel BTI series to generate landing pads in JITed BPF
code so it'd be good if this could be applied on or merged into the BTI
branch.

v2:
 - Fix values for BTI HINTs.
 - Rebase on v5.7-rc3+for-next/bti

Mark Brown (3):
  arm64: insn: Don't assume unrecognized HINTs are NOPs
  arm64: insn: Add constants for PAC and BTI instruction decode
  arm64: insn: Report PAC and BTI instructions as NOPs

 arch/arm64/include/asm/insn.h | 22 ++++++++++++++++++++--
 arch/arm64/kernel/insn.c      | 32 ++++++++++++++++++++++++--------
 2 files changed, 44 insertions(+), 10 deletions(-)