From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C8D231ED92; Thu, 27 Nov 2025 21:42:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764279737; cv=none; b=iHRV6XjdQxPJwhrE5ojikGvRggmZK274yuMNrXM45tmSecFCW7E/hBAIHnUKnwBy82JH3DTjKI4UKTg8vuY90COMdhQVHzvIFp1GDQ3a0gH1kjI9UrAJNvKe7COgWNusUwdiLdSAn67cgb71fmyy0js/qt/LB2qtnDBP+Ix4r/Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764279737; c=relaxed/simple; bh=KAX0PxOUYv9iLmv6tilZUtNNppxKc3cR0nnMREOtVIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jKwDkG/vt7xPcuhROXDdJisSMj7XkxMRo21FUvr2IihZ+8dxsJk9tjjmsFfz83pJSa+QQ8gri12Ua0MtQQgXg8igQvtDA5sT/WaOsYxl2xYQ2leArmtCzOk/HSpgeg+SolVwIgkWxeaAscj+aF7P1wHdBumNMmgsO+nD6sA2LvY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VvWD433E; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VvWD433E" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56099C4CEF8; Thu, 27 Nov 2025 21:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764279736; bh=KAX0PxOUYv9iLmv6tilZUtNNppxKc3cR0nnMREOtVIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VvWD433E2zqSwijN2B6f6HrQkDHnR8GfTmhm4/GK0iQFHVaVpDyQmb0xLBXIdafL9 /iW76RQZq+TdXPWaNqrsU5wOv9i+Z2uL8JPH0StZdzQ7H+cWvglAgLAnbgh/Jki6MK 5GZxrj1M3/7qmUUwqoeL/3j8mctvNaP7gW0NziwaVN0hMprWoQcQFHYJf5UCQE+/FX xYx3B9IgwjULvvSnVCRslhLVYOb4J4q8PRBwmPM684pbmcAheCnxDzJWJOx7ZLvhFD xIISaB0tb/1+oWzInVPuzbjp3RvCWF1oBjL8SjoCG5c87piM8aVm8AsOw0LDKpQt8F W+wKzk/eAAhsQ== From: Jarkko Sakkinen To: linux-integrity@vger.kernel.org Cc: ross.philipson@oracle.com, Jonathan McDowell , Stefano Garzarella , Jarkko Sakkinen , Jonathan McDowell , Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , Roberto Sassu , Mimi Zohar , linux-kernel@vger.kernel.org Subject: [PATCH v8 06/11] tpm2-sessions: Remove 'attributes' from tpm_buf_append_auth Date: Thu, 27 Nov 2025 23:41:31 +0200 Message-ID: <20251127214138.3760029-7-jarkko@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251127214138.3760029-1-jarkko@kernel.org> References: <20251127214138.3760029-1-jarkko@kernel.org> Precedence: bulk X-Mailing-List: linux-integrity@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jarkko Sakkinen In a previous bug fix, 'attributes' was added by mistake to tpm_buf_append_auth(). Remove the parameter. Fixes: 27184f8905ba ("tpm: Opt-in in disable PCR integrity protection") Signed-off-by: Jarkko Sakkinen Reviewed-by: Jonathan McDowell --- v6: - No changes. v5: - No changes. v4: - No changes. v3: - No changes v2: - Uncorrupt the patch. --- drivers/char/tpm/tpm2-cmd.c | 2 +- drivers/char/tpm/tpm2-sessions.c | 5 ++--- include/linux/tpm.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index dd502322f499..2c970ad908db 100644 --- a/drivers/char/tpm/tpm2-cmd.c +++ b/drivers/char/tpm/tpm2-cmd.c @@ -203,7 +203,7 @@ int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0); } else { tpm_buf_append_handle(chip, &buf, pcr_idx); - tpm_buf_append_auth(chip, &buf, 0, NULL, 0); + tpm_buf_append_auth(chip, &buf, NULL, 0); } tpm_buf_append_u32(&buf, chip->nr_allocated_banks); diff --git a/drivers/char/tpm/tpm2-sessions.c b/drivers/char/tpm/tpm2-sessions.c index 6d03c224e6b2..13f019d1312a 100644 --- a/drivers/char/tpm/tpm2-sessions.c +++ b/drivers/char/tpm/tpm2-sessions.c @@ -266,7 +266,7 @@ void tpm_buf_append_name(struct tpm_chip *chip, struct tpm_buf *buf, EXPORT_SYMBOL_GPL(tpm_buf_append_name); void tpm_buf_append_auth(struct tpm_chip *chip, struct tpm_buf *buf, - u8 attributes, u8 *passphrase, int passphrase_len) + u8 *passphrase, int passphrase_len) { /* offset tells us where the sessions area begins */ int offset = buf->handles * 4 + TPM_HEADER_SIZE; @@ -327,8 +327,7 @@ void tpm_buf_append_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf, #endif if (!tpm2_chip_auth(chip)) { - tpm_buf_append_auth(chip, buf, attributes, passphrase, - passphrase_len); + tpm_buf_append_auth(chip, buf, passphrase, passphrase_len); return; } diff --git a/include/linux/tpm.h b/include/linux/tpm.h index 3d8f7d1ce2b8..f7c2bf3b064a 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h @@ -535,7 +535,7 @@ void tpm_buf_append_hmac_session(struct tpm_chip *chip, struct tpm_buf *buf, u8 attributes, u8 *passphrase, int passphraselen); void tpm_buf_append_auth(struct tpm_chip *chip, struct tpm_buf *buf, - u8 attributes, u8 *passphrase, int passphraselen); + u8 *passphrase, int passphraselen); static inline void tpm_buf_append_hmac_session_opt(struct tpm_chip *chip, struct tpm_buf *buf, u8 attributes, -- 2.52.0