]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
efi/libstub/file: Merge file name buffers to reduce stack usage
authorArd Biesheuvel <ardb@kernel.org>
Thu, 9 Apr 2020 13:04:32 +0000 (15:04 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 14 Apr 2020 06:32:15 +0000 (08:32 +0200)
commit464fb126d98a047953040cc9c754801dbda54e5d
tree5973b7c7a6f0220c075df1d7fe235355d6c6177f
parent8b84769a7a1505b279b337dae83d16390e83f5c1
efi/libstub/file: Merge file name buffers to reduce stack usage

Arnd reports that commit

  9302c1bb8e47 ("efi/libstub: Rewrite file I/O routine")

reworks the file I/O routines in a way that triggers the following
warning:

  drivers/firmware/efi/libstub/file.c:240:1: warning: the frame size
            of 1200 bytes is larger than 1024 bytes [-Wframe-larger-than=]

We can work around this issue dropping an instance of efi_char16_t[256]
from the stack frame, and reusing the 'filename' field of the file info
struct that we use to obtain file information from EFI (which contains
the file name even though we already know it since we used it to open
the file in the first place)

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200409130434.6736-8-ardb@kernel.org
drivers/firmware/efi/libstub/file.c