Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
4de50d5
test(raw): pin raw-binary admission and identity
Entrpi Oct 27, 2026
893a023
refactor(raw): carry the raw load selection as one admitted value
Entrpi Oct 27, 2026
56f27b3
feat(raw): state the M-profile raw load contract
Entrpi Oct 27, 2026
f7b4496
feat(raw): admit M-profile loads at a separate base
Entrpi Oct 27, 2026
74b4a2c
feat(raw): give M-profile loads a versioned identity
Entrpi Oct 27, 2026
e1271f9
feat(ghidra): open M-profile loads at their base in Thumb state
Entrpi Oct 27, 2026
5962d2a
test(raw): check saved raw snapshots and schemas stay compatible
Entrpi Oct 27, 2026
6565d11
test(ghidra): verify M-profile raw loads against real Ghidra
Entrpi Oct 27, 2026
ea8ac34
feat(raw): add the armv8.1-m.main variant
Entrpi Oct 28, 2026
8bd006e
fix(ghidra): report Ghidra's ARMv8.1-M loop flow for armv8.1-m.main
Entrpi Oct 28, 2026
b45a7d4
test(ghidra): verify an ARMv8.1-M image against real Ghidra
Entrpi Oct 28, 2026
8d9e15a
refactor: name the variant vocabulary after architecture_variant
Entrpi Oct 28, 2026
63f2552
refactor(ghidra): keep variant decoder limitations beside the languages
Entrpi Oct 28, 2026
56a0587
fix(raw): require base_address with every architecture_variant
Entrpi Oct 28, 2026
808240d
fix(raw): align vector tables as VTOR does and refuse Reset inside them
Entrpi Oct 28, 2026
3bded52
fix(ghidra): key variant coordinates by base, not entry
Entrpi Oct 28, 2026
8315acc
refactor(raw): discriminate the segments load image by layout
Entrpi Oct 28, 2026
a2decdd
docs(raw): record why vector-table words keep their full width
Entrpi Oct 28, 2026
404b60f
docs(raw): record why the seeded entry function is named entry
Entrpi Oct 28, 2026
b381a01
fix(raw): name the refused load input in error details
Entrpi Oct 28, 2026
58ab75f
docs(raw): state that results keep no caller spellings yet
Entrpi Oct 28, 2026
3c4e4f5
docs(raw): explain why reused sessions cannot report stale vector words
Entrpi Oct 28, 2026
891a731
docs(raw): scope architecture_variant to the ARM M profiles
Entrpi Oct 28, 2026
3bc15c9
docs(raw): state each load pairing rule once in open_binary
Entrpi Oct 28, 2026
26cac3d
refactor(ghidra): let session limitations own the variant load facts
Entrpi Oct 28, 2026
33f1d13
refactor(ghidra): launch with the label policy the profile committed
Entrpi Oct 28, 2026
58c7e88
refactor(raw): let the vector-table read carry its length
Entrpi Oct 28, 2026
d7622e8
test(raw): compare saved raw images by their facts, not their prose
Entrpi Oct 28, 2026
36e0908
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Oct 28, 2026
d708eb4
test(ghidra): expect not-in-listing where the Cortex-M lane stops
Entrpi Oct 28, 2026
beaa182
test(raw): pin raw identity to main after its instruction-status revi…
Entrpi Oct 28, 2026
1b55c3a
test(ghidra): own the Cortex-M lane's LLVM and CLI commands
Entrpi Oct 29, 2026
a7451a0
test(raw): derive the Reset fixtures from one Thumb image
Entrpi Oct 29, 2026
bd985a4
docs(raw-binary): say that recording load spellings would not be addi…
Entrpi Oct 29, 2026
4731755
docs(raw-binary): tell callers how to keep their load spellings
Entrpi Oct 29, 2026
c943559
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Oct 29, 2026
13906c5
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Oct 29, 2026
a1c564e
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Oct 31, 2026
8745130
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 1, 2026
93cde07
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 1, 2026
54d4d33
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 1, 2026
b250be1
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 4, 2026
18c8965
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 5, 2026
8aec915
test(ghidra): keep raw digests at main's byte-search and data-type re…
Entrpi Nov 5, 2026
8b78936
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 5, 2026
a0717a6
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 5, 2026
f45a6ca
Merge upstream main into feat-ghidra-mprofile-raw
Entrpi Nov 7, 2026
63b4fc8
Merge main into feat-ghidra-mprofile-raw
Entrpi Nov 7, 2026
46a8db4
test(domain): check raw-binary refusal facts, not sentences
Entrpi Nov 7, 2026
1238961
Merge main into feat-ghidra-mprofile-raw
Entrpi Nov 7, 2026
b82751a
Merge main into feat-ghidra-mprofile-raw
Entrpi Nov 7, 2026
7b4d25e
docs(adr): move the M-profile raw load decision into an ADR
Entrpi Nov 7, 2026
9251826
Merge main into feat-ghidra-mprofile-raw
Entrpi Nov 8, 2026
7c9d321
Merge main into feat-ghidra-mprofile-raw
Entrpi Nov 8, 2026
79ae54d
Merge main into feat-ghidra-mprofile-raw
Entrpi Nov 9, 2026
526c456
Merge main into feat-ghidra-mprofile-raw
Entrpi Nov 9, 2026
f0c95ab
test(ghidra): repin digests and replay for main's call-coverage revision
Entrpi Nov 9, 2026
ec36dc9
Merge branch 'main' into feat-ghidra-mprofile-raw
Entrpi Nov 10, 2026
68fa04d
Merge branch 'main' into feat-ghidra-mprofile-raw
Entrpi Nov 10, 2026
8ae3b4e
Merge branch 'main' into feat-ghidra-mprofile-raw
Entrpi Nov 10, 2026
ca775e7
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 11, 2026
69fb296
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 11, 2026
3760d36
chore(plugin): regenerate the skill bundle from the authored skill
Entrpi Nov 11, 2026
f032197
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 14, 2026
da137b0
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 14, 2026
cf445aa
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 21, 2026
9d7ab2c
test(raw): keep the target route diagnostics within the function leng…
Entrpi Nov 22, 2026
dd59ab0
docs(raw): record the M-profile lane on Ghidra 12.2
Entrpi Nov 22, 2026
583ecb7
refactor(raw): read vector words and own the Cortex-M workspace throu…
Entrpi Nov 22, 2026
0edf352
fix(raw): name raw-binary as the format of vector-table read failures
Entrpi Nov 22, 2026
207631c
fix(verify): remove the Cortex-M workspace after a verified run
Entrpi Nov 22, 2026
35fbcb8
chore(verify): record open_binary's input schema with the M-profile l…
Entrpi Nov 22, 2026
3d8e5c3
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 22, 2026
f6415fe
test(cli): expect open_binary's M-profile load flags in the CLI comma…
Entrpi Nov 22, 2026
c8a68a4
test(cli): record the CLI help goldens with the M-profile load flags
Entrpi Nov 22, 2026
0a66d7c
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 22, 2026
14bce8e
docs(raw-binary): qualify snapshot replay under the producer rule
Entrpi Nov 22, 2026
b660ef4
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 22, 2026
77d14bd
test(ghidra): report why Cortex-M verifier cleanup could not be checked
Entrpi Nov 22, 2026
5ecb56d
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 23, 2026
db9bc1d
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 23, 2026
07f639c
Merge remote-tracking branch 'origin/main' into feat-ghidra-mprofile-raw
Entrpi Nov 23, 2026
4f29527
fix(domain): compare raw-load functions by coordinates, not entry pro…
Entrpi Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(ghidra): keep variant decoder limitations beside the languages
The low-overhead-loop limitation lived in the raw-binary limitations, but
it describes Ghidra's ARM:LE:32:v8-m decoder for armv8.1-m.main whatever
container holds the code. The M-profile ELF lane maps ELF builds to the
same variants and must report the same text.

GHIDRA_VARIANT_LIMITATIONS now sits beside GHIDRA_VARIANT_LANGUAGES and
states the limitations of every variant, so adding a variant also
decides them. Raw results read it; their text and order are unchanged.
  • Loading branch information
Entrpi committed Oct 28, 2026
commit 63f25520f2a921ddbbb21569aeaca4e6b54b12f5
4 changes: 3 additions & 1 deletion docs/raw-binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ This is decision D1 of the embedded-target work, raised in
which admits raw 6502.
- **Owner and consumers.** `src/domain/architectureVariant.ts` owns the
vocabulary; `GHIDRA_VARIANT_LANGUAGES` owns the Ghidra mapping, which
follows the GNU architecture names in Ghidra 12.1.4's `ARM.ldefs`; raw
follows the GNU architecture names in Ghidra 12.1.4's `ARM.ldefs`, and
`GHIDRA_VARIANT_LIMITATIONS` the decoder limitations that every lane
reports for a variant; raw
admission owns the load, its legacy equivalence, the entry's role and basis,
and its `raw_load` identity; the Ghidra profile owns the coordinate context
and the label policy. Consumers are the CLI and MCP inputs, target summaries,
Expand Down
38 changes: 26 additions & 12 deletions src/ghidra/GhidraRawBinaryLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ export const GHIDRA_VARIANT_LANGUAGES = {
"armv8.1-m.main": "ARM:LE:32:v8-m",
} as const satisfies Record<ArchitectureVariant, string>;

/**
* Observed with Ghidra 12.1.4 on the verifier's Cortex-M55 image: WLS and LE
* decode with LLVM's mnemonics, but WLS branched 2 bytes short, LE branched 4
* bytes past the loop start, and LE had no fall-through, so the code after the
* loop was not disassembled.
*/
const GHIDRA_LOW_OVERHEAD_LOOPS =
"Ghidra 12.1.4 decodes the ARMv8.1-M low-overhead-loop branches WLS and LE, but their targets can be wrong and LE has no fall-through, so code after such a loop may be left undisassembled.";

/**
* Limitations of each variant's Ghidra decoder, whatever container holds the
* code; every lane that loads a variant reports them. A new variant states
* its own, even when there are none.
*/
export const GHIDRA_VARIANT_LIMITATIONS = {
"armv6-m": [],
"armv7-m": [],
"armv7e-m": [],
"armv8-m.base": [],
"armv8-m.main": [],
"armv8.1-m.main": [GHIDRA_LOW_OVERHEAD_LOOPS],
} as const satisfies Record<ArchitectureVariant, readonly string[]>;

/**
* Ghidra context register and value that select each entry instruction set,
* and the versioned profile commitment that the entry is seeded with them.
Expand Down Expand Up @@ -125,15 +148,6 @@ export const ghidraRawBinaryLanguage = (
const GENERIC_RAW_LANGUAGES =
"Little-endian generic Ghidra languages are used for x86, x86_64, arm, arm64, and NMOS 6502; m68k uses the big-endian 68000 default language, which decodes the 68040 superset. Big-endian ARM, 65C02, 65816, separate 68020/68030/CPU32/ColdFire variants, and other processor variants are unsupported; ARM M-profile code needs architecture_variant.";

/**
* Observed with Ghidra 12.1.4 on the verifier's Cortex-M55 image: WLS and LE
* decode with LLVM's mnemonics, but WLS branched 2 bytes short, LE branched 4
* bytes past the loop start, and LE had no fall-through, so the code after the
* loop was not disassembled.
*/
const GHIDRA_LOW_OVERHEAD_LOOPS =
"Ghidra 12.1.4 decodes the ARMv8.1-M low-overhead-loop branches WLS and LE, but their targets can be wrong and LE has no fall-through, so code after such a loop may be left undisassembled.";

/** Limitations that every result from a raw-binary session carries. */
export const ghidraRawBinaryLimitations = (
load: RawBinaryLoad,
Expand All @@ -150,9 +164,9 @@ export const ghidraRawBinaryLimitations = (
load.architectureVariant === undefined
? GENERIC_RAW_LANGUAGES
: `The caller-named ${load.architectureVariant} variant is decoded with ${language.languageId} in Thumb state. The decoder does not refuse instructions that this profile lacks, and floating-point and TrustZone state are not modeled.`,
...(load.architectureVariant === "armv8.1-m.main"
? [GHIDRA_LOW_OVERHEAD_LOOPS]
: []),
...(load.architectureVariant === undefined
? []
: GHIDRA_VARIANT_LIMITATIONS[load.architectureVariant]),
...(load.entrySource.kind === "vector-table"
? [
`The entry is the Reset vector ${load.entrySource.resetVector} read from the vector table at ${load.entrySource.address}, with bit 0 cleared. The initial stack pointer ${load.entrySource.initialStackPointer} is recorded and not validated.`,
Expand Down
13 changes: 10 additions & 3 deletions src/ghidra/GhidraRawBinaryLoadImage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { fixtureRawBinaryLoadImage } from "./GhidraRawBinaryLoadImage.fixture.js
import {
GHIDRA_RAW_ENTRY_CONTEXT,
GHIDRA_VARIANT_LANGUAGES,
GHIDRA_VARIANT_LIMITATIONS,
ghidraRawBinaryLanguage,
ghidraRawBinaryLimitations,
} from "./GhidraRawBinaryLanguage.js";
Expand Down Expand Up @@ -77,6 +78,11 @@ describe("raw-binary variant Ghidra binding", () => {
it.each(ARCHITECTURE_VARIANT_NAMES)(
"reports Ghidra's low-overhead-loop flow only for armv8.1-m.main: %s",
(variant) => {
const loopFlow = (text: string) => text.includes("low-overhead-loop");
// Every lane that loads the variant reads this table.
expect(GHIDRA_VARIANT_LIMITATIONS[variant].some(loopFlow)).toBe(
variant === "armv8.1-m.main",
);
const limitations = ghidraRawBinaryLimitations(
admittedRawLoad({
architecture: "arm",
Expand All @@ -87,9 +93,10 @@ describe("raw-binary variant Ghidra binding", () => {
}),
ghidraRawBinaryLanguage("arm", variant),
);
expect(
limitations.some((text) => text.includes("low-overhead-loop")),
).toBe(variant === "armv8.1-m.main");
expect(limitations).toEqual(
expect.arrayContaining([...GHIDRA_VARIANT_LIMITATIONS[variant]]),
);
expect(limitations.some(loopFlow)).toBe(variant === "armv8.1-m.main");
},
);
});
Expand Down