Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tpm2-sessions: Remove 'attributes' parameter from tpm_buf_append_auth

Remove 'attributes' parameter from 'tpm_buf_append_auth', as it is not used
by the function.

Fixes: 27184f8905ba ("tpm: Opt-in in disable PCR integrity protection")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>
Reviewed-by: Jonathan McDowell <noodles@meta.com>

authored by

Jarkko Sakkinen and committed by
Jarkko Sakkinen
bc677a92 bda1cbf7

+4 -5
+1 -1
drivers/char/tpm/tpm2-cmd.c
··· 210 210 tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0); 211 211 } else { 212 212 tpm_buf_append_handle(chip, &buf, pcr_idx); 213 - tpm_buf_append_auth(chip, &buf, 0, NULL, 0); 213 + tpm_buf_append_auth(chip, &buf, NULL, 0); 214 214 } 215 215 216 216 tpm_buf_append_u32(&buf, chip->nr_allocated_banks);
+2 -3
drivers/char/tpm/tpm2-sessions.c
··· 311 311 EXPORT_SYMBOL_GPL(tpm_buf_append_name); 312 312 313 313 void tpm_buf_append_auth(struct tpm_chip *chip, struct tpm_buf *buf, 314 - u8 attributes, u8 *passphrase, int passphrase_len) 314 + u8 *passphrase, int passphrase_len) 315 315 { 316 316 /* offset tells us where the sessions area begins */ 317 317 int offset = buf->handles * 4 + TPM_HEADER_SIZE; ··· 372 372 #endif 373 373 374 374 if (!tpm2_chip_auth(chip)) { 375 - tpm_buf_append_auth(chip, buf, attributes, passphrase, 376 - passphrase_len); 375 + tpm_buf_append_auth(chip, buf, passphrase, passphrase_len); 377 376 return; 378 377 } 379 378
+1 -1
include/linux/tpm.h
··· 535 535 u8 attributes, u8 *passphrase, 536 536 int passphraselen); 537 537 void tpm_buf_append_auth(struct tpm_chip *chip, struct tpm_buf *buf, 538 - u8 attributes, u8 *passphrase, int passphraselen); 538 + u8 *passphrase, int passphraselen); 539 539 static inline void tpm_buf_append_hmac_session_opt(struct tpm_chip *chip, 540 540 struct tpm_buf *buf, 541 541 u8 attributes,