Glossary#
The terms the shirudo documentation uses, each with the page that explains it.
- anchor#
The SHA-256 of the string
nvpcr-init:shirudo:0x<handle>:<name>, with the measurement register’s NV handle and TPM name, whichinitextends into PCR 9 right after it binds the register. It ties the register to the measured boot and closes the register’s first-write branch until the next TPM reset.shirudo attest verifychecks that PCR 9 carries it. See Measurement register.- arena#
A BPF map of type
BPF_MAP_TYPE_ARENA, a memory region from which BPF programs allocate records directly. A upatch that accumulates records keeps them in one arena, which its serializer reads as one consistent snapshot and can reset between exports.upatches/kernel-obs/obs_table.his the template for a double-buffered arena table. See Maps, arenas and serializers.- attach metadata#
The signed
UPGMsection of a load artifact that tells shirudo how to attach each program: its role, its attach kind and, for kprobes and uprobes, the site. It is signed because the site of a kprobe, uprobe,cgroup_skbornetfilterprogram is chosen when the link is created, not by the program’s instructions. After attaching, shirudo compares each link with it and refuses withattach_scope_mismatchon a difference. See upatches, directives and packages.- attestation key#
The TPM key that signs evidence: a restricted ECDSA P-256 signing key, created as a primary under the endorsement hierarchy from a fixed template, so the same TPM always yields the same key.
shirudo attestcreates it for each run and flushes it afterwards. The operator pins its name when enrolling a target and passes it toshirudo attest verify --ak-name. See Measurement register.- Beefile#
The definition of a bpm package: a file in a subset of TOML, in the package directory, that names the package and lists its upatch sources, read-only data generators, extra files and tree selectors.
shirudo bpm buildreadsBeefilein the package directory, or the file that--filenames. See Beefile.- bootstrap settings#
The settings
initneeds before it trusts a config image. The initrd’s/etc/shirudo/shirudo.confnames the runtime image and its root hash (runtime.image,runtime.root_hash). The runtime image’setc/shirudo/shirudo.confnames the config image, its verification certificate and its PCR (config.image,config.verification_key,config.pcr) and holds the TPM settings; no config image can change them. See Config images and dm-verity.- BPF keyring#
The kernel’s
.bpfkeyring, which the kernel uses for a signed BPF program whose load namesKEY_SPEC_BPF_KEYRING. Booted withbpf.keyring_unsealed=1, it starts open;initenrolls the trusted set and seals it, andlsm/key_permissionkeeps tasks without runtime authority from removing keys.lsm/bpf_prog_loadadmits a load from userspace only when the kernel verified its signature against this keyring. See Kernel keyrings.- bpm package#
A versioned
.beefile thatshirudo bpm buildmakes from a Beefile: a gzip-compressed tar archive with the Beefile, the package’s upatches and unload directives, itsREADME.md, the signing certificate and a record of the build environment. The package carries no signature of its own. A repository’s signed index lists its digest, and each upatch inside is signed. See upatches, directives and packages.- challenge#
The credential that
shirudo attest challengemakes on the operator host for a target’s endorsement key and the pinned attestation key name. The target’s TPM recovers it withshirudo attest --challenge=<path>only when both keys are in that TPM, andshirudo attest verify --expect-credentialchecks the recovered value. It shows that the attestation key sits in the TPM the endorsement key identifies. See Attest targets.- config image#
A dm-verity image, mounted read-only and
noexecat/run/shirudo/config, that carries what an operator changes during operation: repositories and their certificates, the tree subscription, node labels, vouched and revoked certificates, and export settings. Its root hash is signed: shirudo verifies the signature against the runtime image’s config certificates before it maps the image, and the kernel against its trusted keys and the sealed.dm-veritykeyring.shirudo image updateactivates a new config image without a reboot and measures it into a dedicated PCR. See Config images and dm-verity.- decoder#
A Lua function shipped inside a upatch that turns a snapshot of one map into OTLP log records or metrics. The program declares it with a
struct decoder_manifestin.rodata,shirudo-buildembeds the source in the signedDCDBsection, andshirudo upatch mapruns it under LuaJIT. See Write a Lua decoder.- endorsement key#
A key that identifies a TPM, derived from its endorsement seed with a template the TCG fixes, and often described by a certificate from the TPM’s manufacturer. shirudo uses it for credential activation, which ties the attestation key to this TPM, and checks the certificate’s chain when the operator passes
--ek-ca. The evidence carries its public part and, when the TPM holds one, its certificate. See TPM 2.0 and how shirudo uses it.- enforcement programs#
The BPF LSM programs embedded in the
shirudobinary, built frombpf/bpf2.c(bpf()admission, keyrings, the private bpffs, mounts, devices and the TPM) andbpf/seal.c(the seal and the task marks).initloads them before their admission gates attach, so they are the one BPF code that does not pass the signed loader path; in production the authenticated initrd vouches for them. Their links are pinned in the private bpffs. See Enforcement in the kernel.- eventlog#
The file
/var/lib/shirudo/eventlog, with one JSON line for every extend of the measurement register: the event digest, its type, the boot ID and the fields the digest covers. shirudo only appends to it and keeps the records of every boot. A verifier trusts it only as far as this boot’s records replay to the value the TPM certifies. See Eventlog events.- evidence#
The JSON document, of kind
shirudo-attestation, thatshirudo attest --nonce=<hex>writes on a target. It carries a TPM quote over the selected PCRs and a TPM certification of the measurement register, both signed by the attestation key over the nonce, together with the attestation and endorsement keys, this boot’s eventlog records and the boot measurement logs.shirudo attest verifychecks it on the operator host. See Attest targets.- failure category#
A name for why an operation failed, such as
tampered,signature_rejectedorpayload_mismatch.shirudo upatch loadandunloadprint it and write it, with the phase the operation reached, into the--reportdocument.tamperedmeans refresh the state and decide again, never retry the same input. See Failure categories and exit status.- identity map#
A one-entry BPF array map, pinned at
/run/shirudo/bpffs/identity, in whichinitrecords what the enforcement programs compare against: the devices of the private bpffs and of/run/shirudo, the.bpfkeyring and the enrolled key serials, the runtime image’s root hash, the NV index and its writer key, the endorsement key’s name for TPM sessions and the.dm-veritykeyring.initfreezes it before the admission gates attach, so userspace cannot change it afterwards. See Enforcement in the kernel.- init record#
The eventlog record of type
initthatshirudo initwrites when it binds the measurement register. It carries theinitevent’s inputs, the values of PCRs 9 and 11 before the binding, whether the initrd made the binding, the register’s TPM name, the anchor, the TPM reset count and the writer key’s public part. In the initrd,initwrites it to/run/shirudo/eventlog.pending, and the root file system’s run adopts it. See Measurement register and attestation.- integrity counter#
A counter for one way to change or read the running kernel that the enforcement programs refuse, such as
ModuleSignature,DevMemorKcore. The counters live in a map pinned at/run/shirudo/bpffs/integrity, apart from the tamper counters, andshirudo statusreports them. See Integrity counters.- keepalive#
An OTLP log record named
shirudo.keepalivethat carries a target’s status record and the TPM quote of it.shirudo-keepalive.timerrunsshirudo status --otelabout every minute, which sends one when an OTLP endpoint is configured and the TPM quotes. A missing keepalive tells a collector that a target stopped reporting; a present one is still the target’s own account. See Monitor and export telemetry.- load artifact#
A
.upatchfile that installs a upatch: a header with the name and the payload digest, the signed loader’s instructions, the loader’s data with the signed sections, and a CMS signature over the instructions followed by the data.shirudo buildwrites it, andshirudo upatch loadloads it. See .upatch format.- map export#
The periodic export of upatch map contents.
shirudo-map-export.timerrunsshirudo upatch map --allabout every five seconds, which reads the maps of every loaded upatch, runs their serializers and decoders, and sends the records to the destinations that the config image’smap_exportsettings name. See Monitor and export telemetry.- measurement register#
The TPM NV extend index,
0x01818E00by default, that records every change to a target’s BPF state during one boot. Each extend needs a signature from the per-boot writer key, andlsm/tpm_commandkeeps tasks without runtime authority from submitting one. It clears at every TPM reset, so its value depends only on the trusted certificates, the restored set, the tree position and the events since boot. See Measurement register.- metadata map#
The array map
__loader.mapthat holds a signed loader’s data during a load. shirudo creates it exclusive to the loader, by the SHA-256 of the loader’s instructions, fills and freezes it, and passes it with the loader toBPF_PROG_LOAD. The kernel verifies the signature over the instructions followed by the map’s frozen contents. See Signed loader path.- NV extend index#
A TPM non-volatile index of type
TPM2_NT_EXTEND, which a write extends like a PCR instead of overwriting. shirudo’s measurement register is one, withTPMA_NV_CLEAR_STCLEARset so that it clears at every TPM reset, following systemd’s NvPCRs. See TPM 2.0 and how shirudo uses it.- NV writer key#
An RSA-3072 key that
initcreates inside the TPM at every boot, and whose signature the measurement register’s write policy requires for every extend. The identity map holds its public part and the input that recreates it, and each command recreates the key to sign one exact extend command. The key is no secret;lsm/tpm_commandis what keeps other tasks from extending. See Measurement register and attestation.- operator#
The role that holds the private ML-DSA-87 signing key, builds and signs upatches, publishes packages and verifies evidence. The operator is stateless: it writes only the key pair and the files the caller names, and it never opens a TPM or a kernel keyring. See Operator and target.
- operator host#
The machine where the operator’s commands run and the signing key is kept. It needs the
shirudo-buildhelper and clang, and no TPM. Its integrity is outside what shirudo protects. See Operator and target.- payload digest#
SHA-256 over a load artifact’s loader instructions followed by its data, stored as
payload_sha256in the header. The target recomputes it before loading and refuses a mismatch. From then on it identifies the upatch: in thesecurity.bpf.shirudo.payloadattribute on the pin directory, in the measurement events and in the unload directive that removes it. See upatches, directives and packages.- pin#
A file in a BPF file system that keeps a BPF object, such as a link or a map, alive after the process that created it exits. shirudo’s commands are one-shot, so every link and map that must stay is pinned in the private bpffs. Removing a pin detaches a link once nothing else holds it. See BPF in brief.
- predict#
shirudo attest predict, which computes on the operator host the register values a target must hold: the set digest, theinitevent, the register at boot and, with--event, the register after later events. It uses the target’s own functions, applied to the certificates and artifacts the operator names. See shirudo attest predict.- private bpffs#
The BPF file system instance that
initmounts at/run/shirudo/bpffswith mode0700. It holds the pins of the enforcement links, the identity map, the tamper and integrity counters and every upatch’s links and maps. BPF LSM hooks refuse unlink, rename and opening a pin there to tasks without runtime authority, and refuse every caller the unmount, move or remount of the mountinitmade. See Enforcement in the kernel.- projection root#
A hash chain over the upatch tree operations a target applied, kept in its tree state. The next boot’s
initevent includes it, so the predicted register covers the tree, andshirudo attest predict --tree-roottakes it as input. See upatches, directives and packages.- repository#
A named OCI registry endpoint together with the certificate that signs its index. On a target, repositories come from the config image’s
etc/shirudo/bpm/registries.d/, andshirudo bpm install <repository>/<package>installs from one. See Deliver packages.- revocation#
Withdrawing trust from a signing key through a signed config image whose
keys/revoked/directory names the key’s certificate. Whenshirudo image updateactivates such a config, shirudo unlinks the key from the.bpfkeyring, measures a key revocation event, and unloads and purges every upatch the key signed.shirudo keys revokerefuses and points to this path. See Manage signing keys.The right that a task mark grants: to run the
bpf()commands, descriptor accesses, pin changes, sealed-state writes, keyring changes and TPM extends that the enforcement programs reserve for shirudo. It never replaces a signature, since a program load from userspace needs a verified signature whoever asks. See Operator and target.- runtime image#
The dm-verity image, mounted read-only at
/run/shirudo/runtime, that carries theshirudoexecutable, the initial BPF certificatekeys/cert.der, the config verification certificates and the bootstrap settings. The UKI’s initrd names its root hash, so the measured boot covers it. Every executable on it gains runtime authority when it runs. See Config images and dm-verity.- seal#
The BPF LSM programs from
bpf/seal.cthat protect shirudo’s writable state and processes. They refuse writes, unlinks, renames, attribute changes and new entries on labeled inodes under/var/lib/shirudoto tasks without runtime authority, and keep other tasks from tracing a marked task. They do not revoke writable descriptors or mappings that existed before. See Seal labels and task marks.- seal label#
The extended attribute
security.bpf.shirudowith a fixed 64-character value that marks an inode the seal protects.initlabels shirudo’s writable state, and a new inode under a labeled directory inherits the label. The label marks a target, not an authority, so copying it onto a binary grants nothing. See Seal labels and task marks.- selector#
The condition on a upatch tree operation: lists of architectures, kernel release prefixes, kernel build IDs, kernel configuration values and node labels.
shirudo bpm tree syncevaluates it on the target and applies only matching operations, and a non-matching operation is skipped for good. See Publish a package.- serializer#
A
SEC("syscall")program in a upatch, namedshirudo_serialize__<map>, that renders one map into the upatch’sshirudo_seroutput map in chunks of 4096 bytes.shirudo upatch mapruns it withBPF_PROG_TEST_RUN, which gives one consistent snapshot of an arena and lets the serializer reset what it exported. See Maps, arenas and serializers.shirudo-build#The operator-only helper that the core
shirudobinary executes forbuild,bpm build,bpm push,bpm tree append,bpm tree show,bpm config update,image build,image verifyandkeys vouch. It links the signer, runs clang and runsveritysetup. The operator package installs it and the target package does not. See Operator and target.SHIRUDO_VERSION_ID#A build identity that
shirudo versionprints: SHA-256 over the source revision and a digest of the build configuration files. It does not hash the binary, so builds of one source for x86-64, arm64 and riscv64 share it.shirudo upatch load --expect-version-id=<id>refuses withversion_mismatchwhen the target’s differs. See shirudo version.- signed index#
The JSON document at
<namespace>/bpm-index:stablein a registry that lists each package’s name, version, manifest digest and package digest, with a detached CMS signature.shirudo bpm pushupdates it and refuses to list a version again with different content, andshirudo bpm repo updateverifies it against the repository’s certificate. See Package and index formats.- signed loader#
A BPF program of type
BPF_PROG_TYPE_SYSCALL, generated by libbpf’sgen_loader, that creates a upatch’s maps and loads its programs from inside the kernel. The operator signs its instructions followed by its data, and the kernel checks that signature atBPF_PROG_LOADagainst the.bpfkeyring. Afterinit, it is the only way BPF from userspace enters the kernel. See Signed loader path.- tamper counter#
A counter for one point at which the enforcement programs refuse a caller, such as
BpfCommand,PinUnlinkorObjGet, or, forSealSignal, let one through. The counters live in a map pinned at/run/shirudo/bpffs/tamperthat only the enforcement programs increment, andshirudo statusreports them. Not every refusal has a counter. See Tamper counters.- target#
A Linux machine with a TPM 2.0 that runs shirudo from an authenticated runtime image, enforces signed BPF in its kernel and measures every change into its TPM. It holds public certificates only, runs no daemon and pulls packages on timers. See Operator and target.
- task mark#
A per-task record in BPF task storage that the seal sets when a task successfully executes a file from the runtime image. A forked child inherits it, a successful exec of any other file clears it, and a failed exec leaves it unchanged. The enforcement programs consult it instead of the task’s path or user. See Seal labels and task marks.
- tree publication#
One generation of a upatch tree: a JSON document with the tree ID, the generation number, the digest of the manifest it replaces and the ordered operations, published with a detached CMS signature under a tag of the tree repository,
stableby default.shirudo bpm tree appendpublishes the next generation, and targets verify it against the active config’s trusted set. See Package and index formats.- trusted set#
The certificates a target enrolls in the
.bpfkeyring at boot: the runtime image’skeys/cert.der, and every certificate under the config image’skeys/trusted/whose vouch verifies under a member, less those the config revokes. It holds at most 16 certificates, and theinitevent covers its digest. See Manage signing keys.- unload directive#
A signed
.upatchwith the unload flag set that removes one upatch. Its signed sections name the upatch and the payload digest it must have. The target has the kernel verify the directive’s loader without running it, and refuses withpayload_mismatchwhen the digest differs from the pin’s. See upatches, directives and packages.- upatch#
A signed BPF object, one or more programs with their maps and attach metadata, that a target loads, pins, archives and measures as one unit. It ships as a load artifact and leaves through an unload directive. See upatch concepts.
- upatch tree#
A signed, append-only, ordered list of operations, each adding or deleting one upatch on the targets its selector matches. Targets subscribe through their config image, and
shirudo bpm tree syncapplies new matching operations in sequence and measures each. See upatches, directives and packages.- verdict#
The one-word result of a check.
shirudo statusreports an overall status ofok,degraded,reboot-pending,init-pending,lsm-offortampered, andOK,WARNorALERTfor each condition.shirudo attest verifyends withverdict: okorverdict: fail. See Read shirudo status.- vouch#
A detached CMS signature by a trusted key over the prefix
shirudo-key-vouch, its terminating NUL and another certificate’s DER.shirudo keys vouchmakes one, and a config image ships it beside that certificate underkeys/trusted/, which admits the certificate to the trusted set at the next boot. A vouch carries no date, so it stays valid after its signer is revoked. See Manage signing keys.