efi/libstub: Use a helper to iterate over a EFI handle array
authorArd Biesheuvel <ardb@kernel.org>
Tue, 24 Dec 2019 15:10:07 +0000 (16:10 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 25 Dec 2019 09:49:16 +0000 (10:49 +0100)
commit2732ea0d5c0a67ec86bfbde2bd68b6152e23ec4e
tree46b819245ac67d0a279a10701fa2a5b784bbc29b
parenta8147dba75b188bff87d4ad072db84a0b70d716d
efi/libstub: Use a helper to iterate over a EFI handle array

Iterating over a EFI handle array is a bit finicky, since we have
to take mixed mode into account, where handles are only 32-bit
while the native efi_handle_t type is 64-bit.

So introduce a helper, and replace the various occurrences of
this pattern.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Borislav Petkov <bp@alien8.de>
Cc: James Morse <james.morse@arm.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191224151025.32482-8-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/eboot.c
drivers/firmware/efi/libstub/gop.c
include/linux/efi.h