Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: use iced-x86 for your x86 decoding #47

Open
woodruffw opened this issue Apr 2, 2021 · 4 comments
Open

Proposal: use iced-x86 for your x86 decoding #47

woodruffw opened this issue Apr 2, 2021 · 4 comments

Comments

@woodruffw
Copy link

Hey there! A coworker of mine shared this with me, and I thought it was very cool.

I noticed that you're using Capstone for your instruction decoding, and then mapping Capstone's internal "group" enum back to human-readable identifiers. I wanted to propose that you give iced-x86 a spin (no affiliation!); I think it has several features that you'll find advantageous:

  1. It has direct support for CPUID/feature-level extraction, via cpuid_features
  2. It's written in pure Rust, which means that your users won't need to install libcapstone
  3. It's much more correct than Capstone (from fuzzing), about on par with Intel's reference decoder (XED)

I'm happy to help with the work that would be involved in replacing Capstone, if you're interested! Feel free to close otherwise 🙂

@pkgw
Copy link
Owner

pkgw commented Apr 3, 2021

Hi — thanks for your interest!

The short story is that I am super busy these days and this tool is a very low priority for me, so this I am definitely not going to undertake this work myself anytime soon. But if someone's interested and wants to attempt this switch, I am more than happy to accept contributions! I'll leave this issue open for tracking purposes.

@HanabishiRecca
Copy link
Contributor

I don't think it is worth doing here as it effectively requires rewriting the app from scratch. Latest fixes made the app perform well enough. Also ARM support is a thing.

I started a standalone X86-only tool instead: https://github.com/HanabishiRecca/bin-cpuflags-x86
Using iced-x86 it is 20-30x faster according to my tests.

@pkgw
Copy link
Owner

pkgw commented Oct 23, 2023

Impressive! @HanabishiRecca I am more than happy to update the README and other materials to recommend people to use your tool if/when it meets their needs — seeing as I only aim to put minimal maintenance effort into this tool, I absolutely do not mind any "competition". Feel free to submit a pull request on the topic if you'd like.

(Just to be clear, this invitation extends to anyone else who happens to read this as well!)

@HanabishiRecca
Copy link
Contributor

Thank you. I think this project can benefit more from wider architectures support. As far as I can tell, at this point it downs to simply mapping existing Capstone groups to human-readable aliases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants