Commit 74d613e0 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

efi/libstub: Avoid CopyMem/SetMem EFI services after ExitBootServices



Given that memset/memcpy are intrinsics, the compiler might insert calls
to these routines unexpectedly, including in code that executes after
ExitBootServices(). In this case, the respective boot services are no
longer accessible, and calling them will cause a crash.

So fall back to a bytewise copy/store if this happens to occur, even
though no such occurrences are known to exist in the kernel currently.

Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent ac2efaa8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment