]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/efi: map the entire UEFI vendor string before reading it
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sun, 26 Jul 2015 12:59:00 +0000 (14:59 +0200)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 27 Jul 2015 17:00:05 +0000 (18:00 +0100)
commit917e25018be6608c4f9d5f556df09dda19ab82b4
tree4108b78d691b26c3dbf69ecc58a82bd6f44ff133
parented5bcb8aebc0174d7396d6222e17a9773f9bdb9a
arm64/efi: map the entire UEFI vendor string before reading it

At boot, the UTF-16 UEFI vendor string is copied from the system
table into a char array with a size of 100 bytes. However, this
size of 100 bytes is also used for memremapping() the source,
which may not be sufficient if the vendor string exceeds 50
UTF-16 characters, and the placement of the vendor string inside
a 4 KB page happens to leave the end unmapped.

So use the correct '100 * sizeof(efi_char16_t)' for the size of
the mapping.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Fixes: df0b3ab7b7df ("arm64: add EFI runtime services")
Cc: <stable@vger.kernel.org> # 3.16+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/efi.c