ACK: [PATCH 2/4] efi_runtime: add datasize return when getting the EFI_BUFFER_TOO_SMALL
Colin Ian King
colin.king at canonical.com
Thu Aug 11 08:48:19 UTC 2016
On 08/08/16 10:40, Ivan Hu wrote:
> Data size is required to return when getting the EFI_BUFFER_TOO_SMALL
> for user to obtain and set the required data buffer size.
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
> efi_runtime/efi_runtime.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
> index c73d968..8c77c77 100644
> --- a/efi_runtime/efi_runtime.c
> +++ b/efi_runtime/efi_runtime.c
> @@ -235,6 +235,10 @@ static long efi_runtime_get_variable(unsigned long arg)
> if (dz && put_user(datasize, getvariable_local.data_size))
> return -EFAULT;
> return 0;
> + } else if (status == EFI_BUFFER_TOO_SMALL) {
> + if (dz && put_user(datasize, getvariable_local.data_size))
> + return -EFAULT;
> + return -EINVAL;
> } else {
> return -EINVAL;
> }
>
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list