feat(domain): map the ppc64 reader name to the powerpc Evidence subject

Static readers report a 64-bit PowerPC ELF as ppc64, and the Evidence subject of those reports had no architecture because the name mapped to no family. With EM_PPC64 classified as powerpc, the subject now carries that family, as it does for ppc.

The Go verifier and the Go and Rust guides state the new mapping, and the boundary test keeps an unknown machine (s390) to show that unrecognized names still map to no family.

Refs morluto/rea#12085.
This commit is contained in:
Davmunrey committed 2026-11-18 18:09:20 +00:00
1 parent b029434bf6
commit bbd7f7f661
5 files changed
+15 -8

No files matched your search

+2 -2
View File
@@ -273,5 +273,5 @@ reader. The verification lane requires Go; normal inspection does not.
Reader architecture names remain verbatim in the report. Evidence subjects use
the recognized canonical family: `386` maps to `x86`, `amd64` to `x86_64`, and
`ppc` to `powerpc`. Unknown families such as `ppc64` remain unknown rather than
being inferred from a related spelling.
`ppc` and `ppc64` to `powerpc`. Unknown families such as `s390` remain unknown
rather than being inferred from a related spelling.
+2 -2
View File
@@ -205,8 +205,8 @@ displace independently observed dependency facts.
Reader architecture names remain verbatim in the report. Evidence subjects use
the recognized canonical family: `386` maps to `x86`, `amd64` to `x86_64`, and
`ppc` to `powerpc`. Unknown families such as `ppc64` remain unknown rather than
being inferred from a related spelling.
`ppc` and `ppc64` to `powerpc`. Unknown families such as `s390` remain unknown
rather than being inferred from a related spelling.
Input and complete-report admission are caller choices through `producer_limits`:
`input_bytes` defaults to 256 MiB and `output_bytes` to 8 MiB. Both accept positive
+7 -3
View File
@@ -451,9 +451,13 @@ async function verify(
assert.equal(report.architecture, target[1]);
assert.equal(
evidence.subject.identity.architecture,
{ amd64: "x86_64", 386: "x86", arm64: "arm64", mips: "mips" }[
target[1]
] ?? null,
{
amd64: "x86_64",
386: "x86",
arm64: "arm64",
mips: "mips",
ppc64: "powerpc",
}[target[1]] ?? null,
);
assert.equal(report.bits, target[3]);
assert.equal(report.byte_order, target[4]);
+1
View File
@@ -8,6 +8,7 @@ export const binaryMetadataArchitecture = (architecture: string) => {
case "amd64":
return "x86_64";
case "ppc":
case "ppc64":
return "powerpc";
default:
return BINARY_ARCHITECTURES.find(
@@ -23,7 +23,9 @@ it.each([
[1, 2, 20, "ppc", "powerpc"],
[1, 1, 3, "386", "x86"],
[2, 1, 62, "amd64", "x86_64"],
[2, 2, 21, "ppc64", null],
[2, 1, 21, "ppc64", "powerpc"],
[2, 2, 21, "ppc64", "powerpc"],
[2, 2, 22, "s390", null],
] as const)(
"preserves ELF class%d byte-order%d machine%d in Go and Rust subjects",
async (bits, endian, machine, local, canonical) => {