Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314284 > unrolled thread

Re: [PATCH v3 18/21] efi: stub: implement efi_get_random_bytes() based on EFI_RNG_PROTOCOL

Started byMatt Fleming <matt@codeblueprint.co.uk>
First post2016-01-21 16:50 +0100
Last post2016-01-21 17:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 18/21] efi: stub: implement efi_get_random_bytes()  based on EFI_RNG_PROTOCOL Matt Fleming <matt@codeblueprint.co.uk> - 2016-01-21 16:50 +0100
    Re: [PATCH v3 18/21] efi: stub: implement efi_get_random_bytes()  based on EFI_RNG_PROTOCOL Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-21 17:20 +0100

#1314284 — Re: [PATCH v3 18/21] efi: stub: implement efi_get_random_bytes() based on EFI_RNG_PROTOCOL

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-01-21 16:50 +0100
SubjectRe: [PATCH v3 18/21] efi: stub: implement efi_get_random_bytes() based on EFI_RNG_PROTOCOL
Message-ID<qTpEK-7eF-17@gated-at.bofh.it>
On Mon, 11 Jan, at 02:19:12PM, Ard Biesheuvel wrote:
> This exposes the firmware's implementation of EFI_RNG_PROTOCOL via a new
> function efi_get_random_bytes().
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  drivers/firmware/efi/libstub/Makefile  |  2 +-
>  drivers/firmware/efi/libstub/efistub.h |  3 ++
>  drivers/firmware/efi/libstub/random.c  | 35 ++++++++++++++++++++
>  include/linux/efi.h                    |  5 ++-
>  4 files changed, 43 insertions(+), 2 deletions(-)

[...]

> @@ -0,0 +1,35 @@
> +/*
> + * Copyright (C) 2016 Linaro Ltd;  <ard.biesheuvel@linaro.org>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + */
> +
> +#include <linux/efi.h>
> +#include <asm/efi.h>
> +
> +#include "efistub.h"
> +
> +struct efi_rng_protocol_t {
> +	efi_status_t (*get_info)(struct efi_rng_protocol_t *,
> +				 unsigned long *, efi_guid_t *);
> +	efi_status_t (*get_rng)(struct efi_rng_protocol_t *,
> +				efi_guid_t *, unsigned long, u8 *out);
> +};

This is not the usual naming convention for EFI structs, it should
either be 'struct efi_rng_protocol' or 'efi_rng_protocol_t'.

But apart from that, this patch looks fine.

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>

[toc] | [next] | [standalone]


#1314317

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2016-01-21 17:20 +0100
Message-ID<qTq7M-7IN-7@gated-at.bofh.it>
In reply to#1314284
On 21 January 2016 at 16:42, Matt Fleming <matt@codeblueprint.co.uk> wrote:
> On Mon, 11 Jan, at 02:19:12PM, Ard Biesheuvel wrote:
>> This exposes the firmware's implementation of EFI_RNG_PROTOCOL via a new
>> function efi_get_random_bytes().
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  drivers/firmware/efi/libstub/Makefile  |  2 +-
>>  drivers/firmware/efi/libstub/efistub.h |  3 ++
>>  drivers/firmware/efi/libstub/random.c  | 35 ++++++++++++++++++++
>>  include/linux/efi.h                    |  5 ++-
>>  4 files changed, 43 insertions(+), 2 deletions(-)
>
> [...]
>
>> @@ -0,0 +1,35 @@
>> +/*
>> + * Copyright (C) 2016 Linaro Ltd;  <ard.biesheuvel@linaro.org>
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + *
>> + */
>> +
>> +#include <linux/efi.h>
>> +#include <asm/efi.h>
>> +
>> +#include "efistub.h"
>> +
>> +struct efi_rng_protocol_t {
>> +     efi_status_t (*get_info)(struct efi_rng_protocol_t *,
>> +                              unsigned long *, efi_guid_t *);
>> +     efi_status_t (*get_rng)(struct efi_rng_protocol_t *,
>> +                             efi_guid_t *, unsigned long, u8 *out);
>> +};
>
> This is not the usual naming convention for EFI structs, it should
> either be 'struct efi_rng_protocol' or 'efi_rng_protocol_t'.
>

OK, I will change that.

> But apart from that, this patch looks fine.
>
> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>

Thanks

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web