Skip to content

Commit bc677a9

Browse files
committed
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: 27184f8 ("tpm: Opt-in in disable PCR integrity protection") Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com> Reviewed-by: Jonathan McDowell <noodles@meta.com>
1 parent bda1cbf commit bc677a9

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/char/tpm/tpm2-cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
210210
tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0);
211211
} else {
212212
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);
214214
}
215215

216216
tpm_buf_append_u32(&buf, chip->nr_allocated_banks);

drivers/char/tpm/tpm2-sessions.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ int tpm_buf_append_name(struct tpm_chip *chip, struct tpm_buf *buf,
311311
EXPORT_SYMBOL_GPL(tpm_buf_append_name);
312312

313313
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)
315315
{
316316
/* offset tells us where the sessions area begins */
317317
int offset = buf->handles * 4 + TPM_HEADER_SIZE;
@@ -372,8 +372,7 @@ void tpm_buf_append_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf,
372372
#endif
373373

374374
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);
377376
return;
378377
}
379378

include/linux/tpm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ void tpm_buf_append_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf,
535535
u8 attributes, u8 *passphrase,
536536
int passphraselen);
537537
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);
539539
static inline void tpm_buf_append_hmac_session_opt(struct tpm_chip *chip,
540540
struct tpm_buf *buf,
541541
u8 attributes,

0 commit comments

Comments
 (0)