| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * arch/arm64/kernel/probes/decode-insn.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2013 Linaro Limited. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 13 | | - * General Public License for more details. |
|---|
| 14 | 6 | */ |
|---|
| 15 | 7 | |
|---|
| 16 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 37 | 29 | aarch64_insn_is_msr_imm(insn) || |
|---|
| 38 | 30 | aarch64_insn_is_msr_reg(insn) || |
|---|
| 39 | 31 | aarch64_insn_is_exception(insn) || |
|---|
| 40 | | - aarch64_insn_is_eret(insn)) |
|---|
| 32 | + aarch64_insn_is_eret(insn) || |
|---|
| 33 | + aarch64_insn_is_eret_auth(insn)) |
|---|
| 41 | 34 | return false; |
|---|
| 42 | 35 | |
|---|
| 43 | 36 | /* |
|---|
| .. | .. |
|---|
| 50 | 43 | != AARCH64_INSN_SPCLREG_DAIF; |
|---|
| 51 | 44 | |
|---|
| 52 | 45 | /* |
|---|
| 53 | | - * The HINT instruction is is problematic when single-stepping, |
|---|
| 54 | | - * except for the NOP case. |
|---|
| 46 | + * The HINT instruction is steppable only if it is in whitelist |
|---|
| 47 | + * and the rest of other such instructions are blocked for |
|---|
| 48 | + * single stepping as they may cause exception or other |
|---|
| 49 | + * unintended behaviour. |
|---|
| 55 | 50 | */ |
|---|
| 56 | 51 | if (aarch64_insn_is_hint(insn)) |
|---|
| 57 | | - return aarch64_insn_is_nop(insn); |
|---|
| 52 | + return aarch64_insn_is_steppable_hint(insn); |
|---|
| 58 | 53 | |
|---|
| 59 | 54 | return true; |
|---|
| 60 | 55 | } |
|---|