efi/runtime-wrappers: Use type safe encapsulation of call arguments
authorArd Biesheuvel <ardb@kernel.org>
Sun, 2 Jul 2023 13:15:18 +0000 (15:15 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 21 Aug 2023 15:59:54 +0000 (17:59 +0200)
commitc7c7bce093c883739d6735d68604055131acfbea
treec093b755ec57bedb8eb63f48fddb3461a1f71bf4
parentd8ea2ffd017d0608635c0ec7bc9ba39edbbd2482
efi/runtime-wrappers: Use type safe encapsulation of call arguments

The current code that marshalls the EFI runtime call arguments to hand
them off to a async helper does so in a type unsafe and slightly messy
manner - everything is cast to void* except for some integral types that
are passed by reference and dereferenced on the receiver end.

Let's clean this up a bit, and record the arguments of each runtime
service invocation exactly as they are issued, in a manner that permits
the compiler to check the types of the arguments at both ends.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/runtime-wrappers.c
include/linux/efi.h