Repository navigation
npu: kernel sets now ship with a signed manifest instead of sealing - #548
bong-water-water-bong wants to merge 3 commits into
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Follow-up commit: the readable layout sidecar no longer ships (the layout record rides inside the signed manifest) and kernel directories are opaque ids, so packaging, the image and the checks stop requiring |
The kernel sets carry a signed manifest: every file in a set is listed with its sha256 and the engine, which holds only the release public key, refuses a file the manifest does not cover. Packaging, the image, the release check and the launcher follow the same shape: a set without its manifest, a file that does not match it, and anything unlisted under npu/kernels is a failure; nothing else about the NPU lane changes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Follow-up to the signed-manifest change: the readable layout sidecar no longer ships (the layout recordrides inside the signed manifest) and the kernel directories are opaque ids, so packaging, the image, the release check and the package checks stop looking for layout.json and stop requiring layer1_<name> directory names. A set that still carries layout.json, or a file the manifest does not list, is a failure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… comment Rebased onto main (0d0c846) and reviewed against the current packaging, image and release check (#556, #563, #569): - docs/releases.md conflicted on the pins table and the NPU paragraph: the branch put the private repositories' names back into a public file ("gpu-kernels (private, HIP)", "npu-kernels (private, signed)", "npu-runtime (private)"), which main had scrubbed. Resolved keeping main's wording ("private kernel add-on (HIP)", "private NPU kernel set (signed)", "private NPU runtime") and the new shape. - scripts/weekly.sh package_checks: the set's manifest is now derived from `rel` once, instead of rebuilding the path with `${f%/npu/kernels/*}` plus `cut` (which can leave a double slash). Checked that the derived path resolves for <pkg>/npu/kernels/<set>/<id>/layer1.elf. - os/mini/init.sh: comment wrapped. Not marked ready: the package stage stages nothing against the pins in this tree (see the PR comment). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
d72e2a5 to
f774667
Compare
|
Review: rebased onto main ( 1. It stages no kernels with the pins in this tree.
2. Nothing in the tree implements what the docs now promise. A signed manifest is verified by the loader, and the loader is the private NPU runtime: the public tree has zero references to And the question that needs the owner, not me: sealing was confidentiality — "a lifted kernel file is ciphertext and does not run". A signature is authenticity/integrity: the same What I changed on the branch (rebased, conflicts resolved,
Smaller review notes: the manifest line format ( I did not run |
|
Preparing review... |
|
Closing as not planned, on the owner's rule: the NPU kernels stay closed source, and a plaintext The release format stays sealed sets: Kept as a possible follow-up (new issue, no deadline): signing the manifest on top of the sealed sets, which adds For the record, the review findings on this branch: it staged nothing with the pins in the tree |
) Sealing is confidentiality only. A set re-sealed under another key, or a different set that also decrypts, is indistinguishable from ours by the 1BPKCRYP check alone, and #548 was closed as not planned for replacing sealing instead of adding to it. Authenticity goes on top: every set now carries manifest.json - each file it ships, with the sha256 of its ciphertext, plus the set's own name - and manifest.sig, Ed25519 over the manifest's exact bytes by the release signing key. tools/seal_manifest.py the public half: keygen / write <set> --key / check (digests, no key) / verify (with the release public key) / --self-test. Python 3 stdlib only, its own RFC 8032 Ed25519, because os/mini/release-check.sh has to make the same judgement on a busybox stick with no crypto module and no openssl. tests/seal_manifest_test.sh + ctest seal_manifest throwaway key and set in a temp dir: pass on intact, fail on a missing manifest, an unlisted file, a flipped ciphertext byte, and a manifest signed by another key (plus a set moved onto another set's name). scripts/package-linux.sh a sealed set without manifest.json and manifest.sig is not packed at all; the staged copy is checked (verified when ONEBIT_SEAL_PUB names the release public key). scripts/weekly.sh package_checks allows the two new files per set and requires them, checking the tarball's own copy so a manifest that does not list exactly the packed files fails the package. os/mini/release-check.sh the sealed row now also requires every file under /data/npu/kernels to be listed in its set's manifest (seal_manifest_problems, driven by the script's own --self-test), and a new sealed-sig row verifies manifest.sig with the release public key, saying so when the image has no key instead of passing unchecked. scripts/lemond-onebit.sh keeps ONEBIT_KCRYPT_REQUIRE_SEALED=1 and names, without setting, ONEBIT_KCRYPT_REQUIRE_MANIFEST=1: the loader-side switch the private NPU runtime must read, which lands with its pin bump. docs/npu.md, docs/releases.md what a set ships and who checks it. The loader half, the release key and any real re-seal stay private; no switch is exported that nothing reads yet (#548). Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg>
Kernel sets now ship with a signed manifest instead of sealing.
Packaging, the image, the release check and the launcher follow the same shape: each set carries its manifest, every file it ships is listed in it and must match its sha256, and anything unlisted under
npu/kernelsfails the check. Nothing else about the NPU lane changes.🤖 Generated with Claude Code