forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arm64/kernel/probes/decode-insn.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * arch/arm64/kernel/probes/decode-insn.c
34 *
45 * 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.
146 */
157
168 #include <linux/kernel.h>
....@@ -37,7 +29,8 @@
3729 aarch64_insn_is_msr_imm(insn) ||
3830 aarch64_insn_is_msr_reg(insn) ||
3931 aarch64_insn_is_exception(insn) ||
40
- aarch64_insn_is_eret(insn))
32
+ aarch64_insn_is_eret(insn) ||
33
+ aarch64_insn_is_eret_auth(insn))
4134 return false;
4235
4336 /*
....@@ -50,11 +43,13 @@
5043 != AARCH64_INSN_SPCLREG_DAIF;
5144
5245 /*
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.
5550 */
5651 if (aarch64_insn_is_hint(insn))
57
- return aarch64_insn_is_nop(insn);
52
+ return aarch64_insn_is_steppable_hint(insn);
5853
5954 return true;
6055 }