From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, yrl.pp-manager.tt@hitachi.com
Subject: [PATCH 3/4] [BUGFIX] x86/tools: Fix instruction decoder message output
Date: Tue, 22 Nov 2011 03:11:19 +0900 [thread overview]
Message-ID: <20111121181119.27410.25790.stgit@cloud> (raw)
In-Reply-To: <20111121181044.27410.263.stgit@cloud>
Fix instruction decoder test (insn_sanity), so that
it doesn't show both info and error messages twice on
same instruction. (In that case, show only error message)
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/tools/insn_sanity.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c
index 334d9de..2025603 100644
--- a/arch/x86/tools/insn_sanity.c
+++ b/arch/x86/tools/insn_sanity.c
@@ -257,15 +257,14 @@ int main(int argc, char **argv)
insn_init(&insn, insn_buf, x86_64);
insn_get_length(&insn);
- if (verbose && !insn_complete(&insn))
- dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
-
if (insn.next_byte <= insn.kaddr ||
insn.kaddr + MAX_INSN_SIZE < insn.next_byte) {
/* Access out-of-range memory */
dump_stream(stdout, "Error: Found an access violation", i, insn_buf, &insn);
errors++;
- }
+ } else if (verbose && !insn_complete(&insn))
+ dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
+
insns++;
}
next prev parent reply other threads:[~2011-11-21 9:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 18:10 [PATCH 0/4]x86: decoder bugfixes Masami Hiramatsu
2011-11-21 18:11 ` [PATCH 1/4] [BUGFIX] x86/tools: Fix Makefile to build all test tools Masami Hiramatsu
2011-11-21 18:11 ` [PATCH 2/4] [BUGFIX] x86: Fix instruction decoder to handle grouped AVX instructions Masami Hiramatsu
2011-11-21 18:11 ` Masami Hiramatsu [this message]
2011-11-21 18:11 ` [PATCH 4/4] [BUGFIX] x86/tools: Fix insn_sanity message outputs Masami Hiramatsu
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=20111121181119.27410.25790.stgit@cloud \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=yrl.pp-manager.tt@hitachi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.