tpm2_sessions_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


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