tpm_buf_fill_hmac_session(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tpm_buf_fill_hmac_session (9) β€” Kernel API Manual πŸ’–

okay so bestie, welcome to the <pink>Kernel API Manual</pink> entry for tpm_buf_fill_hmac_session(9) β€” literally the glow-up moment where your session HMAC gets finalized. she's the last step, the finishing touch, the setting spray of your TPM command buffer. ✨


🌸 NAME 🌸

tpm_buf_fill_hmac_session β€” finalize the session HMAC 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int tpm_buf_fill_hmac_session (struct tpm_chip *chip , struct tpm_buf
*buf );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • chip β€” the TPM chip structure. your main character, your TPM chip πŸ’…
  • buf β€” The buffer to be appended. yes, this one. the buffer we're appending to, no cap.

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the vibe check, and it's important:

This command must not be called until all of the parameters have been appended to buf β€” otherwise the computed HMAC will be incorrect. 😭 like, fr fr, do not jump the gun here.

This function computes and fills in the session HMAC using the session key and, if TPM2_SA_DECRYPT was specified, computes the encryption key and encrypts the first parameter of the command buffer with it. πŸ”βœ¨

Ends the authorization session on failure. πŸ’€ lowkey dramatic but that's the rule.


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/char/tpm/tpm2-sessions.c, plus the whole friend group:


🌈 ok that's the whole page bestie, mwah πŸ’‹ β€” this one's from ./drivers/char/tpm, dated October 2026, and it's the tpm_buf_fill_hmac_session(9) manual page, slay. πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from