public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] x86: Support llvm-objdump in instruction decoder selftest
@ 2023-11-29 22:17 Nathan Chancellor
  2023-11-29 22:17 ` [PATCH v3 1/3] x86/tools: objdump_reformat.awk: Ensure regex matches fwait Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nathan Chancellor @ 2023-11-29 22:17 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen
  Cc: x86, ndesaulniers, keescook, samuelzeter, mhiramat, linux-kernel,
	llvm, patches, Nathan Chancellor

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>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-30  8:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-29 22:17 [PATCH v3 0/3] x86: Support llvm-objdump in instruction decoder selftest Nathan Chancellor
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox