From cf8b4645e2744fff455fc09167f91d011a3e620a Mon Sep 17 00:00:00 2001 From: blasty Date: Sun, 26 Jul 2026 00:04:38 +0200 Subject: formats: verify every offered processor name against a real IDA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The curated list was written from the procs/ directory listing. Two of the twenty names were wrong, and wrong here is not a soft failure: IDA REFUSES to open the database (rc=4) with nothing useful said. The load dialog would have handed people a dead end from inside the UI that exists to rescue them — the same silent-failure class the dialog was built to kill. h8 -> h8300 (h8.so is the module FILENAME, not a processor name) sparc -> sparcb / sparcl (and SPARC has endianness variants, like MIPS/PPC) Also probed the aliases people reach for first: arm64, aarch64, mips, m68k are all invalid. 'arm' covers AArch64 (verified: an AArch64 blob analyses to 35 functions under -parm), so those names now live in the human labels, where the filter still finds them — typing "arm64" finds ARM, "m68k" finds 68k, "mips" finds both endiannesses. tools/verify_procs.py does the check: open a scratch blob with -p, read back inf_get_procname(), compare. Fresh temp dir per name, because once a database exists IDA ignores the load switches and every name after the first would "pass". 21/21 verified. tests: +11 formats, including the verified-set guard (adding a processor without re-running the script fails on purpose) and checks that the rejected aliases are NOT offered but ARE still findable by typing them. 32/0 formats, 199/0 scenarios. --- docs/PROJECTS.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs') diff --git a/docs/PROJECTS.md b/docs/PROJECTS.md index 5f8e327..88ce2f6 100644 --- a/docs/PROJECTS.md +++ b/docs/PROJECTS.md @@ -258,6 +258,15 @@ when no loader matches: │ Enter accept · Tab base address · Esc load as IDA │ └─────────────────────────────────────────────────────┘ +Every name in that list is verified against a real IDA by `tools/verify_procs.py` +(open a scratch blob with `-p`, read back `inf_get_procname()`). A wrong +name is *rejected* — rc=4, nothing useful said — which would be a dead end handed +out from inside the dialog meant to rescue you. Two of the first twenty were +wrong: `h8` and `sparc` are module filenames (`procs/h8.so`), not processor +names; the real ones are `h8300` and `sparcb`/`sparcl`. The aliases people reach +for first — `arm64`, `aarch64`, `mips`, `m68k` — are all invalid too, so they +live in the human labels where the filter still finds them. + `formats.sniff()` decides whether to ask, and only recognises formats IDA definitely handles (ELF, PE, Mach-O, dex, wasm, ar, COFF, Intel HEX, S-records). Being cautious the wrong way costs one dismissible dialog; being cautious the -- cgit v1.3.1-sl0p