]> git.baikalelectronics.ru Git - kernel.git/commit
efi: libstub: ensure allocated memory to be executable
authorBaskov Evgeniy <baskov@ispras.ru>
Thu, 3 Mar 2022 14:21:20 +0000 (17:21 +0300)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 3 May 2022 13:31:28 +0000 (15:31 +0200)
commitb2a11635e5cfa8bfffa9e3ddb86fdd6adc26f449
tree719ed919905a1c8a7a6a0b4942ddb803df9f60e3
parent58b5512ed475e60fa51184b5c91713622a4ec4e5
efi: libstub: ensure allocated memory to be executable

There are UEFI versions that restrict execution of memory regions,
preventing the kernel from booting. Parts that needs to be executable
are:

* Area used for trampoline placement.
* All memory regions that the kernel may be relocated before
  and during extraction.

Use DXE services to ensure aforementioned address ranges
to be executable. Only modify attributes that does not
have appropriate attributes.

Signed-off-by: Baskov Evgeniy <baskov@ispras.ru>
Link: https://lore.kernel.org/r/20220303142120.1975-3-baskov@ispras.ru
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/Kconfig
drivers/firmware/efi/libstub/x86-stub.c