tpm_pcr_extend(9)
π 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β astruct tpm_chipinstance, orNULLfor the default chip. yes bestie,NULLis 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 oftpm_digeststructures 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 π§
- Kernel file
./drivers/char/tpm/tpm-interface.c tpm_calc_ordinal_duration(9)tpm_transmit(9)tpm_transmit_cmd(9)tpm_is_tpm2(9)tpm_pcr_read(9)tpm_get_random(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms