[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v19 22/33] key_protector: Add TPM2 Key Protector
From: |
Gary Lin |
Subject: |
Re: [PATCH v19 22/33] key_protector: Add TPM2 Key Protector |
Date: |
Fri, 20 Sep 2024 10:17:21 +0800 |
On Thu, Sep 19, 2024 at 11:05:13AM -0400, Stefan Berger wrote:
>
>
> On 9/19/24 3:45 AM, Gary Lin wrote:
> > On Wed, Sep 18, 2024 at 11:22:16AM -0400, Stefan Berger wrote:
> > >
> > >
>
> > > *handle = (TPM_HANDLE_t) num;
> > >
> > How about this change?
> >
> > - return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value %lu is too large to be a
> > TPM handle, TPM handles are unsigned 32-bit integers", num);
> > + return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value " PRIuGRUB_UINT64_T " is
> > too large to be a TPM handle, TPM handles are unsigned 32-bit integers",
> > num);
> >
> There's a missing "%" but it works for me:
> + return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value %" PRIuGRUB_UINT64_T "
> is too large to be a TPM handle, TPM handles are unsigned 32-bit integers",
> num);
>
Thanks! I'll update the string to fix the type error.
Gary Lin
> > Here we use the type macro to choose the correct type string for
> > 'grub_uint64_t' to avoid the potential compiler error.
> >
> > Gary Lin
- [PATCH v19 15/33] libtasn1: compile into asn1 module, (continued)
- [PATCH v19 15/33] libtasn1: compile into asn1 module, Gary Lin, 2024/09/06
- [PATCH v19 16/33] asn1_test: test module for libtasn1, Gary Lin, 2024/09/06
- [PATCH v19 17/33] libtasn1: Add the documentation, Gary Lin, 2024/09/06
- [PATCH v19 18/33] key_protector: Add key protectors framework, Gary Lin, 2024/09/06
- [PATCH v19 19/33] tss2: Add TPM2 buffer handling functions, Gary Lin, 2024/09/06
- [PATCH v19 20/33] tss2: Add TPM2 types and Marshal/Unmarshal functions, Gary Lin, 2024/09/06
- [PATCH v19 22/33] key_protector: Add TPM2 Key Protector, Gary Lin, 2024/09/06
[PATCH v19 23/33] cryptodisk: Support key protectors, Gary Lin, 2024/09/06
[PATCH v19 21/33] tss2: Add TPM2 Software Stack (TSS2) support, Gary Lin, 2024/09/06
[PATCH v19 24/33] util/grub-protect: Add new tool, Gary Lin, 2024/09/06
[PATCH v19 25/33] tpm2_key_protector: Support authorized policy, Gary Lin, 2024/09/06
[PATCH v19 26/33] tpm2_key_protector: Implement NV index, Gary Lin, 2024/09/06
[PATCH v19 27/33] cryptodisk: Fallback to passphrase, Gary Lin, 2024/09/06
[PATCH v19 28/33] cryptodisk: wipe out the cached keys from protectors, Gary Lin, 2024/09/06
[PATCH v19 29/33] diskfilter: look up cryptodisk devices first, Gary Lin, 2024/09/06