On Fri, Jun 28, 2024 at 04:19:00PM +0800, Gary Lin via Grub-devel wrote:
> From: Hernan Gatta <hega...@linux.microsoft.com>
>
> Add a new parameter to cryptomount to support the key protectors framework: 
> -P.
> The parameter is used to automatically retrieve a key from specified key
> protectors. The parameter may be repeated to specify any number of key
> protectors. These are tried in order until one provides a usable key for any
> given disk.
>
> Signed-off-by: Hernan Gatta <hega...@linux.microsoft.com>
> Signed-off-by: Michael Chang <mch...@suse.com>
> Signed-off-by: Gary Lin <g...@suse.com>
> Reviewed-by: Glenn Washburn <developm...@efficientek.com>
> Reviewed-by: Stefan Berger <stef...@linux.ibm.com>
> ---
>  Makefile.util.def           |   1 +
>  grub-core/disk/cryptodisk.c | 243 ++++++++++++++++++++++++++----------
>  include/grub/cryptodisk.h   |  16 +++
>  3 files changed, 196 insertions(+), 64 deletions(-)
>
> diff --git a/include/grub/cryptodisk.h b/include/grub/cryptodisk.h
> index d94df68b6..0b41e249e 100644
> --- a/include/grub/cryptodisk.h
> +++ b/include/grub/cryptodisk.h
> @@ -70,6 +70,18 @@ typedef gcry_err_code_t
>  (*grub_cryptodisk_rekey_func_t) (struct grub_cryptodisk *dev,
>                                grub_uint64_t zoneno);
>
> +struct grub_cryptomount_cached_key
> +{
> +  grub_uint8_t *key;
> +  grub_size_t key_len;
> +
> +  /*
> +   * The key protector associated with this cache entry failed, so avoid it
> +   * even if the cached entry (an instance of this structure) is empty.
> +   */
> +  int invalid;

Please use bool instead.

If you fix this feel free to add my RB to this patch.

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to