This is a note to let you know that I've just added the patch titled

    x86,efi: Check max_size only if it is non-zero.

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-efi-check-max_size-only-if-it-is-non-zero.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From b12bcd7b3fe04a5fcca945aaf5b74181d9a223f4 Mon Sep 17 00:00:00 2001
From: Richard Weinberger <[email protected]>
Date: Wed, 10 Apr 2013 10:59:34 +0200
Subject: x86,efi: Check max_size only if it is non-zero.

From: Richard Weinberger <[email protected]>

commit 7791c8423f1f7f4dad94e753bae67461d5b80be8 upstream.

Some EFI implementations return always a MaximumVariableSize of 0,
check against max_size only if it is non-zero.
My Intel DQ67SW desktop board has such an implementation.

Signed-off-by: Richard Weinberger <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Cc: Rui Xiang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 arch/x86/platform/efi/efi.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -979,7 +979,12 @@ efi_status_t efi_query_variable_store(u3
        if (status != EFI_SUCCESS)
                return status;
 
-       if (!storage_size || size > remaining_size || size > max_size ||
+       if (!max_size && remaining_size > size)
+               printk_once(KERN_ERR FW_BUG "Broken EFI implementation"
+                           " is returning MaxVariableSize=0\n");
+
+       if (!storage_size || size > remaining_size ||
+           (max_size && size > max_size) ||
            (remaining_size - size) < (storage_size / 2))
                return EFI_OUT_OF_RESOURCES;
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/x86-efi-implement-efi_no_storage_paranoia-parameter.patch
queue-3.4/x86-efi-check-max_size-only-if-it-is-non-zero.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to