All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>, xen-devel@lists.xen.org
Cc: Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] EFI: Fix getting EFI variable list on some systems
Date: Mon, 9 Mar 2015 17:20:07 +0000	[thread overview]
Message-ID: <54FDD647.7070806@citrix.com> (raw)
In-Reply-To: <1425919679-22436-1-git-send-email-ross.lagerwall@citrix.com>

On 09/03/15 16:47, Ross Lagerwall wrote:
> Copy the entire output buffer to the guest because it may contain data beyond
> the output size that the firmware requires on a subsequent
> GetNextVariableName() call (e.g. a NULL character).
>
> The spec requires that on each call, "the previous results" be passed in.
>
> Without this change, the following (simplified) sequence would occur:
> GetNextVariableName: in \0, out AdminPw\0, size 7
> GetNextVariableName: in AdminPw\0, out UserPw\0, size 6
> GetNextVariableName: in UserPww\0, NOT FOUND
>
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
>  xen/common/efi/runtime.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
> index 7ed5bfa..20772f3 100644
> --- a/xen/common/efi/runtime.c
> +++ b/xen/common/efi/runtime.c
> @@ -518,7 +518,7 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
>  
>              if ( !EFI_ERROR(status) &&
>                   copy_to_guest(op->u.get_next_variable_name.name,
> -                               name.raw, size) )
> +                               name.raw, op->u.get_next_variable_name.size) )
>                  rc = -EFAULT;
>              op->u.get_next_variable_name.size = size;
>          }

  reply	other threads:[~2015-03-09 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 16:47 [PATCH] EFI: Fix getting EFI variable list on some systems Ross Lagerwall
2015-03-09 17:20 ` Andrew Cooper [this message]
2015-03-10  8:44 ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54FDD647.7070806@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.