tpm2_sessions_init(9)
β¨ tpm2_sessions_init β¨
Hey bestie, welcome to the kernel API manual for tpm2_sessions_init β like, the actual start of day initialization for the sessions code π
. Yes, this is a section 9 (kernel API) page, and yes, it's about TPM chips. Slay.
πΈ SYNOPSIS πΈ
int tpm2_sessions_init(struct tpm_chip *chip);
π ARGUMENTS π
chipβ the TPM chip, obviously π«Ά. That's the whole argument, bestie, it just wants the chip.
π¦ DESCRIPTION π¦
Okay so what this actually does: it derives and context saves the null primary, and allocates memory in the struct tpm_chip for the authorizations. Literally that's it, but it's giving main character energy in the session setup world π.
β RETURN β
Here's the vibe check on what you get back:
0β OK β¨ everything's good, no cap.-errnoβ a system error π it's giving bad news.TPM_RCβ a TPM error π the TPM itself said nope.
π SEE ALSO π
Lowkey you should also peek at the kernel file ./drivers/char/tpm/tpm2-sessions.c β that's where the magic lives, iykyk. And these besties right here:
tpm_buf_append_name(9)tpm_buf_append_hmac_session(9)tpm_buf_fill_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)
Also the ./drivers/char/tpm directory is where this all hangs out, so that's your little home base for the TPM stuff, bestie π π
That's the whole page, bestie, you ate that π
β¨. This one's from the Kernel API Manual, dated October 2026, living under ./drivers/char/tpm β go forth and init those sessions fr fr ππ¦πΈ
π¦ 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