lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1408007731-15081-5-git-send-email-dyoung@redhat.com> Date: Thu, 14 Aug 2014 17:15:30 +0800 From: Dave Young <dyoung@...hat.com> To: Matt Fleming <matt.fleming@...el.com> Cc: Catalin Marinas <catalin.marinas@....com>, Will Deacon <will.deacon@....com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, hpa@...or.com, Alessandro Zummo <a.zummo@...ertech.it>, Leif Lindholm <leif.lindholm@...aro.org>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, Mark Salter <msalter@...hat.com>, Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-efi@...r.kernel.org, Daniel Kiper <daniel.kiper@...cle.com>, Russ Anderson <rja@....com> Subject: [PATCH 5/7] arm64/efi: do not enter virtual mode in case booting with efi=noruntime or noefi In case efi runtime disabled via noefi kernel cmdline arm64_enter_virtual_mode should error out. At the same time move early_memunmap(memmap.map, mapsize) to the beginning of the function or it will leak early mem. Signed-off-by: Dave Young <dyoung@...hat.com> --- arch/arm64/kernel/efi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 6ed0362..309fab1 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -392,11 +392,16 @@ static int __init arm64_enter_virtual_mode(void) return -1; } + mapsize = memmap.map_end - memmap.map; + if (efi_runtime_disabled()) { + early_memunmap(memmap.map, mapsize); + pr_info("EFI runtime services will be disabled.\n"); + return -1; + } + pr_info("Remapping and enabling EFI services.\n"); /* replace early memmap mapping with permanent mapping */ - mapsize = memmap.map_end - memmap.map; - early_memunmap(memmap.map, mapsize); memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map, mapsize); memmap.map_end = memmap.map + mapsize; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists