From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jarkko Sakkinen" <jarkko@kernel.org>,
"James Bottomley" <James.Bottomley@HansenPartnership.com>,
<linux-integrity@vger.kernel.org>
Cc: <keyrings@vger.kernel.org>
Subject: Re: [PATCH 2/6] tpm: add policy sessions
Date: Tue, 16 Jul 2024 17:08:55 +0300 [thread overview]
Message-ID: <D2R0TZB6I6Z8.1R0YSFP46LXPF@kernel.org> (raw)
In-Reply-To: <D2R0SSS449F2.1CSVCMJ39S3LB@kernel.org>
On Tue Jul 16, 2024 at 5:07 PM EEST, Jarkko Sakkinen wrote:
> On Tue Jul 16, 2024 at 2:53 PM EEST, Jarkko Sakkinen wrote:
> > > - u8 name[AUTH_MAX_NAMES][2 + SHA512_DIGEST_SIZE];
> > > + u8 name[AUTH_MAX_NAMES][2 + HASH_MAX_DIGESTSIZE];
>
> Ouch, we definitely do not want 2-dimensional arrays. I missed this in
> the hmac review.
>
> Why this is based on count (AUTH_MAX_NAMES) rather than space? Is that
> value from the specs?
>
> You could just as well replace name and name_h with a single tpm_buf
> instance in "sized" mode and return -E2BIG from the functions that use
> it. Right, those don't return anything but void, which should be also
> fixed.
tpm_buf_write_u32()
tpm_buf_write()
tpm_buf_write_u32()
tpm_buf_write()
Two buffers stored. The read functions are non-destructive. Let's not
invent ad-hoc crap when we have already a tested and legit tool for
this.
BR, Jarkko
next prev parent reply other threads:[~2024-07-16 14:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 13:04 [PATCH 0/6] Add policy to sealed keys James Bottomley
2024-05-24 13:04 ` [PATCH 1/6] tpm: consolidate TPM to crypto hash algorithm conversion James Bottomley
2024-05-24 13:40 ` Jarkko Sakkinen
2024-05-24 13:52 ` Jarkko Sakkinen
2024-05-27 3:45 ` Ben Boeckel
2024-05-27 11:18 ` Jarkko Sakkinen
2024-07-16 11:13 ` Jarkko Sakkinen
2024-05-24 13:04 ` [PATCH 2/6] tpm: add policy sessions James Bottomley
2024-07-16 11:53 ` Jarkko Sakkinen
2024-07-16 14:07 ` Jarkko Sakkinen
2024-07-16 14:08 ` Jarkko Sakkinen [this message]
2024-07-16 14:12 ` Jarkko Sakkinen
2024-07-18 2:30 ` James Bottomley
2024-07-19 13:21 ` Jarkko Sakkinen
2024-07-19 13:26 ` Jarkko Sakkinen
2024-05-24 13:04 ` [PATCH 3/6] KEYS: trusted: add PCR policy to TPM2 keys James Bottomley
2024-07-16 12:01 ` Jarkko Sakkinen
2024-05-24 13:04 ` [PATCH 4/6] KEYS: trusted: add ability to specify arbitrary policy James Bottomley
2024-07-16 12:01 ` Jarkko Sakkinen
2024-05-24 13:04 ` [PATCH 5/6] KEYS: trusted: implement counter/timer policy James Bottomley
2024-07-16 12:03 ` Jarkko Sakkinen
2024-05-24 13:04 ` [PATCH 6/6] KEYS: trusted: add support for TPM keys with signed policy James Bottomley
2024-07-16 12:03 ` Jarkko Sakkinen
2024-05-24 13:24 ` [PATCH 0/6] Add policy to sealed keys Jarkko Sakkinen
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=D2R0TZB6I6Z8.1R0YSFP46LXPF@kernel.org \
--to=jarkko@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.