[PATCH] x86, efi: initial the local variable of DataSize to zero
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 Cc: Matt Fleming Cc: H. Peter Anvin Signed-off-by: Lee, Chun-Yi --- 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; -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL] EFI urgent fix
On Fri, 26 Apr, at 09:40:46AM, Linus Torvalds wrote: > On Fri, Apr 26, 2013 at 9:30 AM, Matt Fleming wrote: > > Hi Peter, Linus, > > > > I've got a small patch that fixes a crash for the Google folks and their > > EFI SMI driver, which was caused by dereferencing a garbage pointer. > > Hmm. I already took this from the earlier email you sent. Did it change since? Nope, there hasn't been any change. I just didn't know whether you preferred to take the fix via email or a pull request. Thanks for picking this up. -- Matt Fleming, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL] EFI urgent fix
On Fri, Apr 26, 2013 at 9:30 AM, Matt Fleming wrote: > Hi Peter, Linus, > > I've got a small patch that fixes a crash for the Google folks and their > EFI SMI driver, which was caused by dereferencing a garbage pointer. Hmm. I already took this from the earlier email you sent. Did it change since? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL] EFI urgent fix
Hi Peter, Linus, I've got a small patch that fixes a crash for the Google folks and their EFI SMI driver, which was caused by dereferencing a garbage pointer. Please consider pulling. The following changes since commit f697036b93aa7345d4cbb3c854a76456c0ddac45: efi: Check EFI revision in setup_efi_vars (2013-04-24 16:19:01 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent for you to fetch changes up to 45432323ef7038a91599959173700fdb8a0adb2f: efivars: only check for duplicates on the registered list (2013-04-26 16:50:01 +0100) * Last minute bugfix for the efivars code. The google EFI SMI driver maintains its own list of EFI variables but the efivars core was directly accessing a different (and in this case, uninitialised) list resulting in a crash. Matt Fleming (1): efivars: only check for duplicates on the registered list drivers/firmware/efivars.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) -- Matt Fleming, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html