All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	 dave.hansen@linux.intel.com
Cc: x86@kernel.org, ndesaulniers@google.com, keescook@chromium.org,
	 samuelzeter@gmail.com, mhiramat@kernel.org,
	linux-kernel@vger.kernel.org,  llvm@lists.linux.dev,
	patches@lists.linux.dev,  Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH v3 0/3] x86: Support llvm-objdump in instruction decoder selftest
Date: Wed, 29 Nov 2023 15:17:40 -0700	[thread overview]
Message-ID: <20231129-objdump-reformat-llvm-v3-0-0d855e79314d@kernel.org> (raw)

I have taken up this series from Sam to try and drive this forward.

Currently, the instruction decoder selftest does not work with
llvm-objdump because chkobjdump.awk is GNU binutils specific.
chkobjdump.awk can be eliminated altogether because the minimum
supported version of GNU binutils has been bumped to 2.25.

However, with chkobjdump.awk removed, the selftest does not actually
work properly with llvm-objdump:

  $ make -skj"$(nproc)" LLVM=1 defconfig
  $ scripts/config -e X86_DECODER_SELFTEST
  $ make -skj"$(nproc)" LLVM=1 olddefconfig bzImage
  ...
  arch/x86/tools/insn_decoder_test: warning: objdump says 0 bytes, but insn_get_length() says 2
  ...

Upon inspection it turned out llvm-objdump was formatting its output
differently, which caused objdump_reformat.awk to incorrectly output its
values.

After fixing that bug, a second one was seen where the instruction
"wait" was incorrectly matched with "fwait", which again caused
insn_decoder_test to fail.

Changes in v3:
- Further commit message and cover letter formatting and improvements.
- Add patch 3, which is the ultimate catalyst for the first two changes
- Link to v2: https://lore.kernel.org/r/20221112090418.284656-1-samuelzeter@gmail.com/

Changes in v2:
- Coding style commit message amendments
- Link to v1: https://lore.kernel.org/r/20220106023606.283953-1-samuelzeter@gmail.com/

---
Nathan Chancellor (1):
      x86/tools: Remove chkobjdump.awk

Samuel Zeter (2):
      x86/tools: objdump_reformat.awk: Ensure regex matches fwait
      x86/tools: objdump_reformat.awk: Allow for spaces

 arch/x86/tools/Makefile             |  2 +-
 arch/x86/tools/chkobjdump.awk       | 34 ----------------------------------
 arch/x86/tools/objdump_reformat.awk |  4 ++--
 3 files changed, 3 insertions(+), 37 deletions(-)
---
base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
change-id: 20231129-objdump-reformat-llvm-2d71b9f40ac2

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


             reply	other threads:[~2023-11-29 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 22:17 Nathan Chancellor [this message]
2023-11-29 22:17 ` [PATCH v3 1/3] x86/tools: objdump_reformat.awk: Ensure regex matches fwait Nathan Chancellor
2023-11-30  8:51   ` [tip: x86/build] " tip-bot2 for Samuel Zeter
2023-11-29 22:17 ` [PATCH v3 2/3] x86/tools: objdump_reformat.awk: Allow for spaces Nathan Chancellor
2023-11-30  8:51   ` [tip: x86/build] " tip-bot2 for Samuel Zeter
2023-11-29 22:17 ` [PATCH v3 3/3] x86/tools: Remove chkobjdump.awk Nathan Chancellor
2023-11-30  8:51   ` [tip: x86/build] " tip-bot2 for Nathan Chancellor

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=20231129-objdump-reformat-llvm-v3-0-0d855e79314d@kernel.org \
    --to=nathan@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=patches@lists.linux.dev \
    --cc=samuelzeter@gmail.com \
    --cc=tglx@linutronix.de \
    --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 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.