From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/core] objtool,x86: Teach decode about LOOP* instructions
Date: Thu, 15 Sep 2022 14:24:27 -0000 [thread overview]
Message-ID: <166325186772.401.11612053064323908718.tip-bot2@tip-bot2> (raw)
In-Reply-To: <Yxhd4EMKyoFoH9y4@hirez.programming.kicks-ass.net>
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: 7a7621dfa417aa3715d2a3bd1bdd6cf5018274d0
Gitweb: https://git.kernel.org/tip/7a7621dfa417aa3715d2a3bd1bdd6cf5018274d0
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Wed, 07 Sep 2022 11:01:20 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 15 Sep 2022 16:13:55 +02:00
objtool,x86: Teach decode about LOOP* instructions
When 'discussing' control flow Masami mentioned the LOOP* instructions
and I realized objtool doesn't decode them properly.
As it turns out, these instructions are somewhat inefficient and as
such unlikely to be emitted by the compiler (a few vmlinux.o checks
can't find a single one) so this isn't critical, but still, best to
decode them properly.
Reported-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/Yxhd4EMKyoFoH9y4@hirez.programming.kicks-ass.net
---
tools/objtool/arch/x86/decode.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
index c260006..1c253b4 100644
--- a/tools/objtool/arch/x86/decode.c
+++ b/tools/objtool/arch/x86/decode.c
@@ -635,6 +635,12 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
*type = INSN_CONTEXT_SWITCH;
break;
+ case 0xe0: /* loopne */
+ case 0xe1: /* loope */
+ case 0xe2: /* loop */
+ *type = INSN_JUMP_CONDITIONAL;
+ break;
+
case 0xe8:
*type = INSN_CALL;
/*
next prev parent reply other threads:[~2022-09-15 14:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 0:55 [PATCH 0/2] x86/kprobes: Fixes for CONFIG_RETHUNK Masami Hiramatsu (Google)
2022-09-07 0:55 ` [PATCH 1/2] x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK Masami Hiramatsu (Google)
2022-09-07 7:06 ` Peter Zijlstra
2022-09-07 9:01 ` [PATCH] objtool,x86: Teach decode about LOOP* instructions Peter Zijlstra
2022-09-07 9:06 ` David Laight
2022-09-07 9:40 ` Peter Zijlstra
2022-09-07 11:13 ` David Laight
2022-09-15 14:24 ` tip-bot2 for Peter Zijlstra [this message]
2022-09-07 9:12 ` [PATCH 1/2] x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK Masami Hiramatsu
2022-09-07 9:38 ` Peter Zijlstra
2022-09-07 9:53 ` Masami Hiramatsu
2022-09-07 8:02 ` Peter Zijlstra
2022-09-07 8:11 ` Peter Zijlstra
2022-09-07 9:49 ` Masami Hiramatsu
2022-09-07 10:19 ` Peter Zijlstra
2022-09-07 11:44 ` Peter Zijlstra
2022-09-07 13:05 ` Peter Zijlstra
2022-09-07 14:14 ` Masami Hiramatsu
2022-09-07 14:27 ` Peter Zijlstra
2022-09-07 15:22 ` Masami Hiramatsu
2022-09-07 12:56 ` Peter Zijlstra
2022-09-07 13:49 ` Masami Hiramatsu
2022-09-07 14:28 ` Peter Zijlstra
2022-09-07 12:59 ` Peter Zijlstra
2022-09-07 13:53 ` Masami Hiramatsu
2022-09-07 0:55 ` [PATCH 2/2] x86/kprobes: Fix optprobe optimization " Masami Hiramatsu (Google)
2022-09-07 6:52 ` [PATCH 0/2] x86/kprobes: Fixes for CONFIG_RETHUNK Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=166325186772.401.11612053064323908718.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox