@@ -40,12 +40,13 @@ enum aarch64_insn_encoding_class {
};
enum aarch64_insn_hint_op {
- AARCH64_INSN_HINT_NOP = 0x0 << 5,
- AARCH64_INSN_HINT_YIELD = 0x1 << 5,
- AARCH64_INSN_HINT_WFE = 0x2 << 5,
- AARCH64_INSN_HINT_WFI = 0x3 << 5,
- AARCH64_INSN_HINT_SEV = 0x4 << 5,
- AARCH64_INSN_HINT_SEVL = 0x5 << 5,
+ AARCH64_INSN_HINT_NOP = 0x0 << 5,
+ AARCH64_INSN_HINT_YIELD = 0x1 << 5,
+ AARCH64_INSN_HINT_WFE = 0x2 << 5,
+ AARCH64_INSN_HINT_WFI = 0x3 << 5,
+ AARCH64_INSN_HINT_SEV = 0x4 << 5,
+ AARCH64_INSN_HINT_SEVL = 0x5 << 5,
+ AARCH64_INSN_HINT_AUTIASP = (0x3 << 8) | (0x5 << 5),
};
enum aarch64_insn_imm_type {
@@ -63,6 +63,7 @@ bool __kprobes aarch64_insn_is_nop(u32 insn)
case AARCH64_INSN_HINT_WFI:
case AARCH64_INSN_HINT_SEV:
case AARCH64_INSN_HINT_SEVL:
+ case AARCH64_INSN_HINT_AUTIASP:
return false;
default:
return true;
@@ -42,7 +42,7 @@ static bool __kprobes aarch64_insn_is_steppable(u32 insn)
!= AARCH64_INSN_SPCLREG_DAIF;
/*
- * The HINT instruction is is problematic when single-stepping,
+ * The HINT instruction is problematic when single-stepping,
* except for the NOP case.
*/
if (aarch64_insn_is_hint(insn))
This patch disables the probing of authenticate ptrauth instruction (AUTIASP) which falls under the hint instructions region. This is done to disallow probe of authenticate instruction in the kernel which may lead to ptrauth faults with the addition of Armv8.6 enhanced ptrauth features. The corresponding append pac ptrauth instruction (PACIASP) is not disabled and they can still be probed. Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com> --- This patch may need some changes with Mark Brown's work on whitelisting of hint instructions [1]. [1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2020-March/720280.html arch/arm64/include/asm/insn.h | 13 +++++++------ arch/arm64/kernel/insn.c | 1 + arch/arm64/kernel/probes/decode-insn.c | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-)