From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Michel Alex <Alex.Michel@wiedemann-group.com>
Cc: "u-boot@lists.denx.de" <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/1] tpm: fixed the nv_define_space command in TPMv2
Date: Tue, 18 Feb 2025 09:38:04 +0200 [thread overview]
Message-ID: <Z7Q43GmC4mpcG249@hera> (raw)
In-Reply-To: <AS1P250MB060864865460745C69F23D74A9FF2@AS1P250MB0608.EURP250.PROD.OUTLOOK.COM>
Hi Michel
On Thu, Feb 13, 2025 at 12:43:34PM +0000, Michel Alex wrote:
> Added 2 HMAC bytes to the command message
Please cc the TPM maintainers, otherwise I might miss this patch.
What the patch does is obvious, can you add a better explanation of
- what it fixes / what was broken?
- pointers to spec that define the hmac size and placement?
Thanks
/Ilias
>
> Signed-off-by: Alex Michel <alex.michel@wiedemann-group.com>
> ---
> lib/tpm-v2.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
> index 9ca7933c094..4a082af78af 100644
> --- a/lib/tpm-v2.c
> +++ b/lib/tpm-v2.c
> @@ -264,7 +264,7 @@ u32 tpm2_nv_define_space(struct udevice *dev, u32 space_index,
> * chunks below.
> */
> const int platform_len = sizeof(u32);
> - const int session_hdr_len = 13;
> + const int session_hdr_len = 15;
> const int message_len = 14;
> uint offset = TPM2_HDR_LEN + platform_len + session_hdr_len +
> message_len;
> @@ -277,11 +277,12 @@ u32 tpm2_nv_define_space(struct udevice *dev, u32 space_index,
> /* handles 4 bytes */
> tpm_u32(TPM2_RH_PLATFORM), /* Primary platform seed */
>
> - /* session header 13 bytes */
> + /* session header 15 bytes */
> tpm_u32(9), /* Header size */
> tpm_u32(TPM2_RS_PW), /* Password authorisation */
> tpm_u16(0), /* nonce_size */
> 0, /* session_attrs */
> + tpm_u16(0), /* HMAC size */
> tpm_u16(0), /* auth_size */
>
> /* message 14 bytes + policy */
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-02-18 7:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 12:43 [PATCH 1/1] tpm: fixed the nv_define_space command in TPMv2 Michel Alex
2025-02-18 7:38 ` Ilias Apalodimas [this message]
2025-02-20 7:14 ` Michel Alex
2025-02-20 8:27 ` Ilias Apalodimas
2025-03-11 14:43 ` Ilias Apalodimas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z7Q43GmC4mpcG249@hera \
--to=ilias.apalodimas@linaro.org \
--cc=Alex.Michel@wiedemann-group.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox