diff options
author | Jeffrey Hugo <jhugo@codeaurora.org> | 2016-08-29 23:38:52 +0300 |
---|---|---|
committer | Matt Fleming <matt@codeblueprint.co.uk> | 2016-09-05 14:32:28 +0300 |
commit | fc07716ba803483be91bc4b2344f9c84985e6f07 (patch) | |
tree | 67256f8edc0ddb23dc5f6be586c90ee01877a2a4 /lib/kasprintf.c | |
parent | dadb57abc37499f565b23933dbf49b435c3ba8af (diff) | |
download | linux-fc07716ba803483be91bc4b2344f9c84985e6f07.tar.xz |
efi/libstub: Introduce ExitBootServices helper
The spec allows ExitBootServices to fail with EFI_INVALID_PARAMETER if a
race condition has occurred where the EFI has updated the memory map after
the stub grabbed a reference to the map. The spec defines a retry
proceedure with specific requirements to handle this scenario.
This scenario was previously observed on x86 - commit d3768d885c6c ("x86,
efi: retry ExitBootServices() on failure") but the current fix is not spec
compliant and the scenario is now observed on the Qualcomm Technologies
QDF2432 via the FDT stub which does not handle the error and thus causes
boot failures. The user will notice the boot failure as the kernel is not
executed and the system may drop back to a UEFI shell, but will be
unresponsive to input and the system will require a power cycle to recover.
Add a helper to the stub library that correctly adheres to the spec in the
case of EFI_INVALID_PARAMETER from ExitBootServices and can be universally
used across all stub implementations.
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Diffstat (limited to 'lib/kasprintf.c')
0 files changed, 0 insertions, 0 deletions