Skip to contentSkip to conversation

x86/EFI: permit setting variable with non-zero attributes

PATCH In review Jan Beulich 2 participants 2 messages Mar 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/EFI: permit setting variable with non-zero attributes

This must have been a copy-and-paste mistake - get_variable uses op->misc as output only, and wants to make sure it's zero for future extensibility. For set_variable, this is an input though, and hence the check is wrong.

xen/arch/x86/efi/runtime.c +0 -3
@@ -398,9 +398,6 @@ int efi_runtime_call(struct xenpf_efi_ru
         long len;
         unsigned char *data;
 
-        if ( op->misc )
-            return -EINVAL;
-
         len = gwstrlen(guest_handle_cast(op->u.set_variable.name, CHAR16));
         if ( len < 0 )
             return len;

x86/EFI: permit setting variable with non-zero attributes

This must have been a copy-and-paste mistake - get_variable uses op->misc as output only, and wants to make sure it's zero for future extensibility. For set_variable, this is an input though, and hence the check is wrong.

xen/arch/x86/efi/runtime.c +0 -3
@@ -398,9 +398,6 @@ int efi_runtime_call(struct xenpf_efi_ru
         long len;
         unsigned char *data;
 
-        if ( op->misc )
-            return -EINVAL;
-
         len = gwstrlen(guest_handle_cast(op->u.set_variable.name, CHAR16));
         if ( len < 0 )
             return len;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jan Beulich

This must have been a copy-and-paste mistake - get_variable uses op->misc as output only, and wants to make sure it's zero for future extensibility. For set_variable, this is an input though, and hence the check is wrong.

Quoted 19 lines
xen/arch/x86/efi/runtime.c +0 -3
@@ -398,9 +398,6 @@ int efi_runtime_call(struct xenpf_efi_ru
         long len;
         unsigned char *data;
 
-        if ( op->misc )
-            return -EINVAL;
-
         len = gwstrlen(guest_handle_cast(op->u.set_variable.name, CHAR16));
         if ( len < 0 )
             return len;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel