aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-11-09 16:02:56 -0500
committerMatt Fleming <matt.fleming@intel.com>2012-11-13 07:33:21 -0500
commit89d16665d388837b30972081d97b814be26d68a2 (patch)
tree0fd95e1e9d6886c27e7d9b7eed7464cd2e22988d /include
parentcfcf2f11708f934d2bd294f973c2fcb0cc54f293 (diff)
efivarfs: Use query_variable_info() to limit kmalloc()
We don't want someone who can write EFI variables to be able to allocate arbitrarily large amounts of memory, so cap it to something sensible like the amount of free space for EFI variables. Acked-by: Jeremy Kerr <jeremy.kerr@canonical.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 5e2308d9c6be..f80079cd84f4 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -646,6 +646,7 @@ struct efivar_operations {
646 efi_get_variable_t *get_variable; 646 efi_get_variable_t *get_variable;
647 efi_get_next_variable_t *get_next_variable; 647 efi_get_next_variable_t *get_next_variable;
648 efi_set_variable_t *set_variable; 648 efi_set_variable_t *set_variable;
649 efi_query_variable_info_t *query_variable_info;
649}; 650};
650 651
651struct efivars { 652struct efivars {