tpm_buf_append_name(9)
π NAME π
okay so bestie, this page is tpm_buf_append_name(9) from the Kernel API Manual, and it is literally about adding a handle area to the buffer β¨
tpm_buf_append_name β add a handle area to the buffer π
πΈ SYNOPSIS πΈ
int tpm_buf_append_name (struct tpm_chip *chip , struct tpm_buf *buf ,
u32 handle , u8 *name );
π ARGUMENTS π
chipβ the TPM chip structure π«Άbufβ the buffer to be appended πhandleβ the handle to be appended π₯nameβ the name of the handle (may beNULL) πΈ
π¦ DESCRIPTION π¦
So, to compute session HMACs, we literally need to know the names of the objects that the handles point at π
For most objects, this is simply the actual 4 byte handle or an empty buf β and in those cases name should be NULL π
But for volatile objects, permanent objects, and NV areas, the name is defined as the hash β using the name algorithm, which should be set to sha256 β of the public area with the two byte algorithm id appended to it β¨ For those objects, the name pointer should point to this π―
If a name is required but name is NULL, then TPM2_ReadPublic gets called on the handle to obtain the name π
Like most tpm_buf operations, success is assumed β failure comes from an incorrect programming model and gets indicated by a kernel message π
π¨ Heads up bestie: it ends the authorization session on failure π
π SEE ALSO π
- Kernel file
./drivers/char/tpm/tpm2-sessions.cπ§ 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)π₯tpm2_sessions_init(9)π
mwah π this iconic little page comes from ./drivers/char/tpm, dated October 2026, and it is still tpm_buf_append_name(9) β bye bestie, go slay those handles π«Άπ
π¦ 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