[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v18 12/25] key_protector: Add key protectors framework
From: |
Gary Lin |
Subject: |
Re: [PATCH v18 12/25] key_protector: Add key protectors framework |
Date: |
Mon, 1 Jul 2024 10:19:22 +0800 |
On Fri, Jun 28, 2024 at 02:54:53PM +0300, Vladimir 'phcoder' Serbinenko wrote:
> > + if (protector == NULL || protector->name == NULL || grub_strlen
> > (protector->name) == 0)
> > + return GRUB_ERR_BAD_ARGUMENT;
> > +
> Here and in the other places you miss grub_error. Note that the
> message in such technical cases should be left untranslated (no N_
> mark).
>
Ok. I'll add grub_error to provide the better error messages.
> > + if (protector == NULL || grub_strlen (protector) == 0)
>
> Rather than checking strlen just do protector[0] == '\0'
Ah, right. It's more efficient.
Gary Lin
- [PATCH v18 06/25] libtasn1: Use grub_divmod64() for division, (continued)
- [PATCH v18 06/25] libtasn1: Use grub_divmod64() for division, Gary Lin, 2024/06/28
- [PATCH v18 03/25] libtasn1: disable code not needed in grub, Gary Lin, 2024/06/28
- [PATCH v18 05/25] libtasn1: adjust the header paths in libtasn1.h, Gary Lin, 2024/06/28
- [PATCH v18 07/25] libtasn1: fix the potential buffer overrun, Gary Lin, 2024/06/28
- [PATCH v18 08/25] asn1_test: changes for grub compatibility, Gary Lin, 2024/06/28
- [PATCH v18 09/25] libtasn1: compile into asn1 module, Gary Lin, 2024/06/28
- [PATCH v18 10/25] asn1_test: test module for libtasn1, Gary Lin, 2024/06/28
- [PATCH v18 11/25] libtasn1: Add the documentation, Gary Lin, 2024/06/28
- [PATCH v18 12/25] key_protector: Add key protectors framework, Gary Lin, 2024/06/28
- [PATCH v18 13/25] tss2: Add TPM2 buffer handling functions, Gary Lin, 2024/06/28
- [PATCH v18 14/25] tss2: Add TPM2 types and Marshal/Unmarshal functions, Gary Lin, 2024/06/28
- [PATCH v18 15/25] tss2: Add TPM2 Software Stack (TSS2) support, Gary Lin, 2024/06/28
- [PATCH v18 16/25] key_protector: Add TPM2 Key Protector, Gary Lin, 2024/06/28
- [PATCH v18 17/25] cryptodisk: Support key protectors, Gary Lin, 2024/06/28
- [PATCH v18 18/25] util/grub-protect: Add new tool, Gary Lin, 2024/06/28
- [PATCH v18 19/25] tpm2_key_protector: Support authorized policy, Gary Lin, 2024/06/28
- [PATCH v18 21/25] cryptodisk: Fallback to passphrase, Gary Lin, 2024/06/28
- [PATCH v18 20/25] tpm2_key_protector: Implement NV index, Gary Lin, 2024/06/28
- [PATCH v18 22/25] cryptodisk: wipe out the cached keys from protectors, Gary Lin, 2024/06/28