tpm_buf_fill_hmac_session(9)
π 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:
tpm_buf_append_name(9)tpm_buf_append_hmac_session(9)tpm_buf_check_hmac_response(9)tpm2_end_auth_session(9)tpm2_start_auth_session(9)tpm2_parse_create_primary(9)tpm2_create_primary(9)tpm2_sessions_init(9)
π 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
- 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