Versions and compatibility#
What identifies a build of shirudo, which format and schema numbers its files and documents carry, what each reader does with them, and which mixes of builds work together.
Releases#
There is no shirudo software release. main is the development branch,
and no stable branches are maintained. Every push to main builds the
packages in the Build packages workflow, where they are available as
run artifacts. Until a release, no format below carries a compatibility
promise.
Version string#
shirudo version prints the version string and the version ID
(shirudo version):
shirudo (<describe><extraversion>, "<release-name>")
version-id: <version-id>
Part |
Source |
|---|---|
|
|
|
|
|
|
The package versions in packaging/Makefile derive from the same
describe string. <describe> alone, without <extraversion>,
appears as service.version and the scope version in OTLP documents
(OTLP documents) and as bpm_version and
shirudo.version in a package’s build-environment.json.
Version ID#
SHIRUDO_VERSION_ID is the SHA-256 that the build writes into the
generated util/version_id.c (Makefile.shirudo). Its input:
Input |
Value |
|---|---|
Revision |
|
Dirty mark |
|
Build configuration |
The first 16 hexadecimal digits of a SHA-256 over the checksums of
|
config.mk is the operator profile’s configuration, which the
feature probes in Makefile.config write. It records the compiler and
linker flags of the libraries on the build host, with their paths. The
target profile writes its configuration to config-target.mk, which
the ID does not cover: a target binary’s ID takes the config.mk of
the tree it was built in, or Makefile.shirudo alone in a tree
without one, as after make clean and make target.
Two builds of one commit therefore get different IDs when their trees
hold different config.mk files, for example an operator package
built on its distribution and a target package built on another host.
make and make target in one tree give both binaries the same ID.
Outside a git checkout, every build of the same VERSION with the
same config.mk gets the same ID.
The ID does not cover the compiler and its version, the contents of the
libraries, the generated vendor/linux/vmlinux.h that the BPF objects
compile against, untracked files, EXTRAVERSION or the release name.
Where it appears and what checks it:
Place |
Use |
|---|---|
|
Printed. |
|
Printed. |
|
Written by |
|
Compared with the target binary’s ID. A difference refuses the
command in phase |
The ID keeps an operator and a target of different builds apart when the operator asks for it. It authenticates nothing (R5 in Threat model). Upgrade shirudo and the kernel says where to take the expected ID from.
Format and schema numbers#
A number names the layout its writer used. No reader converts one layout into another, and readers ignore JSON keys they do not know.
Artifacts and published documents, which the operator writes and the target reads:
Structure |
Number |
Reader on another value |
|---|---|---|
|
1 |
The target rejects the file. The section versions are in .upatch format. |
Repository index |
1 |
The target refuses the index ( |
Tree publication |
1 |
The target refuses the publication ( |
|
1 |
Not checked. |
Package and index formats describes the package and index documents, upatch tree the tree documents.
Documents the target writes for operators, collectors and scripts:
Document |
Number |
Reader on another value |
|---|---|---|
Eventlog record |
1 |
Not checked by |
Evidence document |
1 |
Neither is checked by |
|
1 |
|
Credential from |
1 |
|
|
1 |
For consumers. See status JSON. |
Operation report of |
1 |
For consumers. See Failure categories and exit status. |
|
1 |
For consumers. |
State the target keeps for itself:
File |
Number |
Reader on another value |
|---|---|---|
Config activation records under |
1 |
Refused as malformed ( |
|
1 |
Refused by |
Configuration and bootstrap files carry no version. Unknown keys in the
two bootstrap files and the host file draw a warning, and a config image
whose shirudo.conf holds a key other than eventlog.max_bytes or
map_export.* is refused (Configuration).
The config image’s hash tree must carry the standard veritysetup
superblock, version 1, with hash type 1, SHA-256, 4096-byte blocks and a
32-byte salt.
Kernel ABI#
shirudo needs the signed-loader ABI of the bpf-next tree it targets and
the kernel patches it carries, among them the tpm_command and
mm_read_access LSM hooks. A release number does not identify such a
kernel. The pre-flight checks signed_loader_kernel_abi and
kernel_lsm_hooks read the running kernel’s BTF, and a load on a
kernel without the ABI fails with kernel_abi_unsupported.
System requirements lists the kernel requirements and how
to identify a kernel, Kernel interfaces every interface
shirudo uses, and Carried kernel patches the kernel project patches.
Mixing builds#
No command negotiates a version with another build, and only
--expect-version-id compares two builds. Keep the operator and every
target on builds of the same commit.
Combination |
Behavior |
|---|---|
Initrd binary and runtime image binary |
Must be the same build (Boot integration).
Nothing compares their IDs. The runtime binary reads the identity
map and the tamper and integrity counters that the initrd’s
|
Operator artifacts on a target of another build |
Load when a key the target trusts signed them, the container and section versions match, and the target kernel accepts the signed loader. The target does not check which build produced an artifact or a package. |
|
Work as long as both builds compute event digests and the register the same way. Nothing checks that. |
|
|