[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210120173800.1660730-8-jthierry@redhat.com>
Date: Wed, 20 Jan 2021 18:37:50 +0100
From: Julien Thierry <jthierry@...hat.com>
To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc: catalin.marinas@....com, will@...nel.org, ardb@...nel.org,
masahiroy@...nel.org, keescook@...omium.org,
michal.lkml@...kovi.net, jpoimboe@...hat.com, peterz@...radead.org,
mark.rutland@....com, broonie@...nel.org,
linux-efi@...r.kernel.org, linux-hardening@...r.kernel.org,
Julien Thierry <jthierry@...hat.com>
Subject: [RFC PATCH 07/17] objtool: arm64: Decode other system instructions
Decode ERET, BRK and NOPs
Signed-off-by: Julien Thierry <jthierry@...hat.com>
---
tools/objtool/arch/arm64/decode.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/objtool/arch/arm64/decode.c b/tools/objtool/arch/arm64/decode.c
index 924121b4b466..a4a587c400a1 100644
--- a/tools/objtool/arch/arm64/decode.c
+++ b/tools/objtool/arch/arm64/decode.c
@@ -223,6 +223,13 @@ int arch_decode_instruction(const struct elf *elf, const struct section *sec,
/* Remaining branch opcodes are conditional */
*type = INSN_JUMP_CONDITIONAL;
*immediate = aarch64_get_branch_offset(insn);
+ } else if (aarch64_insn_is_eret(insn)) {
+ *type = INSN_CONTEXT_SWITCH;
+ } else if (aarch64_insn_is_steppable_hint(insn)) {
+ *type = INSN_NOP;
+ } else if (aarch64_insn_is_brk(insn)) {
+ *immediate = aarch64_insn_decode_immediate(AARCH64_INSN_IMM_16, insn);
+ *type = INSN_BUG;
} else {
*type = INSN_OTHER;
}
--
2.25.4
Powered by blists - more mailing lists