alistair23-linux/drivers/firmware/efi
Jeremy Compostella 2e121d711a efibc: Fix excessive stack footprint warning
GCC complains about a newly added file for the EFI Bootloader Control:

  drivers/firmware/efi/efibc.c: In function 'efibc_set_variable':
  drivers/firmware/efi/efibc.c:53:1: error: the frame size of 2272 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

The problem is the declaration of a local variable of type struct
efivar_entry, which is by itself larger than the warning limit of 1024
bytes.

Use dynamic memory allocation instead of stack memory for the entry
object.

This patch also fixes a potential buffer overflow.

Reported-by: Ingo Molnar <mingo@kernel.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
[ Updated changelog to include GCC error ]
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1462570771-13324-3-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-05-07 07:06:13 +02:00
..
libstub efi/arm*/libstub: Wire up GOP protocol to 'struct screen_info' 2016-04-28 11:34:00 +02:00
arm-init.c efi/arm-init: Reserve rather than unmap the memory map for ARM as well 2016-04-28 11:34:05 +02:00
arm-runtime.c efi/arm*: Take the Memory Attributes table into account 2016-04-28 11:33:55 +02:00
capsule-loader.c efi: Add misc char driver interface to update EFI firmware 2016-04-28 11:34:05 +02:00
capsule.c efi/capsule: Make efi_capsule_pending() lockless 2016-05-07 07:06:13 +02:00
cper.c efi: Handle memory error structures produced based on old versions of standard 2015-07-15 13:30:38 +01:00
efi-pstore.c Half dozen small cleanups plus change to allow pstore 2015-11-05 11:51:18 -08:00
efi.c efi: Move efi_status_to_err() to drivers/firmware/efi/ 2016-04-28 11:34:03 +02:00
efibc.c efibc: Fix excessive stack footprint warning 2016-05-07 07:06:13 +02:00
efivars.c drivers/firmware/efi/efivars.c: use in_compat_syscall() to check for compat callers 2016-03-22 15:36:02 -07:00
esrt.c efi/esrt: Don't preformat name 2015-12-14 15:24:03 +00:00
fake_mem.c efi: Remove global 'memmap' EFI memory map 2016-04-28 11:33:51 +02:00
Kconfig efi: Add misc char driver interface to update EFI firmware 2016-04-28 11:34:05 +02:00
Makefile efi: Add misc char driver interface to update EFI firmware 2016-04-28 11:34:05 +02:00
memattr.c efi: Implement generic support for the Memory Attributes table 2016-04-28 11:33:54 +02:00
reboot.c efi: Add 'capsule' update support 2016-04-28 11:34:03 +02:00
runtime-map.c efi: Fix error handling in add_sysfs_runtime_map_entry() 2015-05-05 16:20:13 +01:00
runtime-wrappers.c efi/runtime-wrappers: Remove ARCH_EFI_IRQ_FLAGS_MASK #ifdef 2016-04-28 11:34:13 +02:00
vars.c efi: Move efi_status_to_err() to drivers/firmware/efi/ 2016-04-28 11:34:03 +02:00