ACK: [PATCH 2/4] efi_runtime: add datasize return when getting the EFI_BUFFER_TOO_SMALL
Alex Hung
alex.hung at canonical.com
Wed Aug 10 03:05:26 UTC 2016
On 2016-08-08 05:40 PM, 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: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list