tpm_pcr_extend(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tpm_pcr_extend(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so welcome to tpm_pcr_extend(9), straight out of the Kernel API Manual, and no because we are literally about to extend a PCR value in the SHA1 bank and it's giving very much main character energy ✨

🌸 NAME 🌸

tpm_pcr_extend β€” extend a PCR value in SHA1 bank. periodt. that's the whole vibe πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

int tpm_pcr_extend (struct tpm_chip *chip , u32 pcr_idx , struct
tpm_digest *digests );

like, look at her. she returns an int, she takes a chip, a pcr_idx, and some digests. iconic. πŸ”₯

πŸŽ€ ARGUMENTS πŸŽ€

  • chip β€” a struct tpm_chip instance, or NULL for the default chip. yes bestie, NULL is valid here and it just means "give me the default one" 🫢
  • pcr_idx β€” the PCR to be retrieved. that's the one you're pointing at πŸ’…
  • digests β€” array of tpm_digest structures used to extend PCRs. plural, babes, it's an array 🌈

⭐ NOTE ⭐

okay this is the part where you actually have to pay attention, no cap:

callers must pass a digest for every allocated PCR bank, in the same order of the banks in chip->allocated_banks.

so like... one digest per allocated bank, same order as chip->allocated_banks. don't get cute with the ordering. the kernel will simply not be slayed by that 😭

πŸ’œ RETURN πŸ’œ

same as with tpm_transmit_cmd. so whatever that gives you back is what you get back here, fr fr. ⭐

🧚 SEE ALSO 🧚

like a little reading list, go off πŸ‘‘


and that's the page! huge shoutout to ./drivers/char/tpm for being the source/version home of all this, dated October 2026 β€” mwah, see you in the group chat, bestie πŸ’–πŸ¦‹πŸ’…

πŸ“¦ where this page comes from