tpm2_end_auth_session(9)
π tpm2_end_auth_session β kill the allocated auth session
okay so bestie, welcome to tpm2_end_auth_session(9), straight out of the Kernel API Manual. it's a tiny little function with one job and honestly? it does it flawlessly. no cap. π
β¨ SYNOPSIS β¨
void tpm2_end_auth_session (struct tpm_chip *chip );
that's it. that's the whole vibe. one argument, returns nothing, zero drama. π
π«Ά ARGUMENTS π«Ά
chipβ the TPM chip structure. yes queen, that's the one. π
πΈ DESCRIPTION πΈ
so here's the tea, bestie: this function ends the session started by tpm2_start_auth_session and frees all the resources. clean exit, no loose ends, we love a tidy queen. β¨
but listen β under normal conditions, tpm_buf_check_hmac_response will correctly end the session if required. so like, this function is not the main character here. it's only for use in error legs that will bypass the normal invocation of tpm_buf_check_hmac_response. so it's giving "cleanup crew" energy, not "everyday hero" energy. π
fr fr: don't just call this whenever. it's specifically for the error paths that skip the normal tpm_buf_check_hmac_response call. it's the cleanup fairy for when things go sideways. π§
π¦ SEE ALSO π¦
all the siblings in Kernel file ./drivers/char/tpm/tpm2-sessions.c, because they're all in the same friend group:
tpm_buf_append_name(9)tpm_buf_append_hmac_session(9)tpm_buf_fill_hmac_session(9)tpm_buf_check_hmac_response(9)tpm2_start_auth_session(9)tpm2_parse_create_primary(9)tpm2_create_primary(9)tpm2_sessions_init(9)
iykyk, they all link together. π
and that's the whole page, bestie! signed, sealed, delivered from ./drivers/char/tpm and dated October 2026 β slay, go free those resources. πππ
π¦ 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