exynos-linux-stable/arch/x86/platform
Ard Biesheuvel 7711cb4324 efi/x86: Map the entire EFI vendor string before copying it
[ Upstream commit ffc2760bcf2dba0dbef74013ed73eea8310cc52c ]

Fix a couple of issues with the way we map and copy the vendor string:
- we map only 2 bytes, which usually works since you get at least a
  page, but if the vendor string happens to cross a page boundary,
  a crash will result
- only call early_memunmap() if early_memremap() succeeded, or we will
  call it with a NULL address which it doesn't like,
- while at it, switch to early_memremap_ro(), and array indexing rather
  than pointer dereferencing to read the CHAR16 characters.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Matthew Garrett <mjg59@google.com>
Cc: linux-efi@vger.kernel.org
Fixes: 5b83683f32 ("x86: EFI runtime service support")
Link: https://lkml.kernel.org/r/20200103113953.9571-5-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-28 15:42:19 +01:00
..
atom x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:19:34 +02:00
ce4100 x86/ce4100: Remove duplicated include from ce4100.c 2016-07-19 16:02:17 +02:00
efi efi/x86: Map the entire EFI vendor string before copying it 2020-02-28 15:42:19 +01:00
geode x86/platform: Make platform/geode/net5501.c explicitly non-modular 2016-02-16 09:11:09 +01:00
goldfish x86/platform/goldfish: Prevent unconditional loading 2017-02-26 11:10:52 +01:00
intel x86/platform/iosf_mbi: Add Intel Tangier PCI id 2015-07-16 17:48:48 +02:00
intel-mid x86: Don't include linux/irq.h from asm/hardirq.h 2018-08-15 18:14:52 +02:00
intel-quark x86/platform/intel/quark: Drop IMR lock bit support 2016-02-23 07:37:23 +01:00
iris x86: platform: iris: drop owner assignment from platform_drivers 2014-10-20 16:20:15 +02:00
mellanox platform/x86: mlx-platform: free first dev on error 2017-02-01 08:33:13 +01:00
olpc x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC 2018-11-13 11:16:50 -08:00
scx200 X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
sfi x86: Cleanup irq_domain ops 2015-04-24 15:36:55 +02:00
ts5500 x86/platform: Delete extraneous MODULE_* tags fromm ts5500 2016-07-16 22:41:00 +02:00
uv x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls 2019-02-20 10:18:33 +01:00
Makefile x86/platform/mellanox: Introduce support for Mellanox systems platform 2016-09-22 22:13:10 +02:00