All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
To: "Lee, Chun-Yi" <joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Lee,
	Chun-Yi" <jlee-IBi9RG/b67k@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] x86, efi: initial the local variable of DataSize to zero
Date: Mon, 29 Apr 2013 10:55:58 +0100	[thread overview]
Message-ID: <517E43AE.6050203@console-pimps.org> (raw)
In-Reply-To: <1366996767-8234-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>

On 26/04/13 18:19, Lee, Chun-Yi wrote:
> That will be better initial the value of DataSize to zero for the input of
> GetVariable(), otherwise we will feed a random value. The debug log of input
> DataSize like this:
> 
> ...
> [  195.915612] EFI Variables Facility v0.08 2004-May-17
> [  195.915819] efi: size: 18446744071581821342
> [  195.915969] efi:  size': 18446744071581821342
> [  195.916324] efi: size: 18446612150714306560
> [  195.916632] efi:  size': 18446612150714306560
> [  195.917159] efi: size: 18446612150714306560
> [  195.917453] efi:  size': 18446612150714306560
> ...
> 
> Found on Acer Aspire V3 BIOS, it will not return the size of data if we input a
> non-zero DataSize.
> 
> Cc: Matthew Garrett <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Lee, Chun-Yi <jlee-IBi9RG/b67k@public.gmane.org>
> ---
>  arch/x86/platform/efi/efi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index e4a86a6..cb59732 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -204,7 +204,7 @@ static efi_status_t virt_efi_get_next_variable(unsigned long *name_size,
>  	}
>  
>  	if (boot_used_size && !finished) {
> -		unsigned long size;
> +		unsigned long size = 0;
>  		u32 attr;
>  		efi_status_t s;
>  		void *tmp;
> 

Looks good to me. Matthew?

-- 
Matt Fleming, Intel Open Source Technology Center

WARNING: multiple messages have this Message-ID (diff)
From: Matt Fleming <matt@console-pimps.org>
To: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
Cc: matt.fleming@intel.com, mjg59@srcf.ucam.org,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, "Lee,
	Chun-Yi" <jlee@suse.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86, efi: initial the local variable of DataSize to zero
Date: Mon, 29 Apr 2013 10:55:58 +0100	[thread overview]
Message-ID: <517E43AE.6050203@console-pimps.org> (raw)
In-Reply-To: <1366996767-8234-1-git-send-email-jlee@suse.com>

On 26/04/13 18:19, Lee, Chun-Yi wrote:
> That will be better initial the value of DataSize to zero for the input of
> GetVariable(), otherwise we will feed a random value. The debug log of input
> DataSize like this:
> 
> ...
> [  195.915612] EFI Variables Facility v0.08 2004-May-17
> [  195.915819] efi: size: 18446744071581821342
> [  195.915969] efi:  size': 18446744071581821342
> [  195.916324] efi: size: 18446612150714306560
> [  195.916632] efi:  size': 18446612150714306560
> [  195.917159] efi: size: 18446612150714306560
> [  195.917453] efi:  size': 18446612150714306560
> ...
> 
> Found on Acer Aspire V3 BIOS, it will not return the size of data if we input a
> non-zero DataSize.
> 
> Cc: Matthew Garrett <mjg@redhat.com>
> Cc: Matt Fleming <matt.fleming@intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
> ---
>  arch/x86/platform/efi/efi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index e4a86a6..cb59732 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -204,7 +204,7 @@ static efi_status_t virt_efi_get_next_variable(unsigned long *name_size,
>  	}
>  
>  	if (boot_used_size && !finished) {
> -		unsigned long size;
> +		unsigned long size = 0;
>  		u32 attr;
>  		efi_status_t s;
>  		void *tmp;
> 

Looks good to me. Matthew?

-- 
Matt Fleming, Intel Open Source Technology Center

  parent reply	other threads:[~2013-04-29  9:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26 17:19 [PATCH] x86, efi: initial the local variable of DataSize to zero Lee, Chun-Yi
2013-04-26 17:19 ` Lee, Chun-Yi
     [not found] ` <1366996767-8234-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
2013-04-29  9:55   ` Matt Fleming [this message]
2013-04-29  9:55     ` Matt Fleming
2013-04-29 10:25   ` joeyli
2013-04-29 10:25     ` joeyli
     [not found]     ` <1367231111.22858.55.camel-ONCj+Eqt86TasUa73XJKwA@public.gmane.org>
2013-04-29 10:34       ` joeyli
2013-04-29 10:34         ` joeyli
  -- strict thread matches above, loose matches on Subject: below --
2013-05-02 14:07 Lee, Chun-Yi
2013-05-02 14:07 ` Lee, Chun-Yi
     [not found] ` <1367503621-13004-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
2013-05-03  8:50   ` Matt Fleming
2013-05-03  8:50     ` Matt Fleming

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=517E43AE.6050203@console-pimps.org \
    --to=matt-hnk1s37rvnbexh+ff434mdi2o/jbrioy@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=jlee-IBi9RG/b67k@public.gmane.org \
    --cc=joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.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.