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
| ||
|
Date: Wed, 11 May 2016 13:29:48 +0100 From: Matt Fleming <matt@...eblueprint.co.uk> To: Mathieu Poirier <mathieu.poirier@...aro.org> Cc: Shannon Zhao <zhaoshenglong@...wei.com>, "linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>, Catalin Marinas <catalin.marinas@....com>, Will Deacon <will.deacon@....com>, sstabellini@...nel.org, stefano@...reto.com, julien.grall@....com, ard.biesheuvel@...aro.org, xen-devel@...ts.xen.org, "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>, linux-efi@...r.kernel.org, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, shannon.zhao@...aro.org, peter.huangpeng@...wei.com Subject: Re: [PATCH] Xen: EFI: Parse DT parameters for Xen specific UEFI On Fri, 06 May, at 09:52:42AM, Mathieu Poirier wrote: > > +static int __init efi_remap_init(void) > > +{ > > + u64 mapsize; > > + > > + pr_info("Remapping and enabling EFI services.\n"); > > + > > + mapsize = memmap.map_end - memmap.map; > > + memmap.map = (__force void *)ioremap_cache(memmap.phys_map, > > + mapsize); > > + if (!memmap.map) { > > + pr_err("Failed to remap EFI memory map\n"); > > + return -ENOMEM; > > + } > > + memmap.map_end = memmap.map + mapsize; > > + efi.memmap = &memmap; > > + > > + efi.systab = (__force void *)ioremap_cache(efi_system_table, > > + sizeof(efi_system_table_t)); > > + if (!efi.systab) { > > Is there a reason why memmap.map isn't iounmap() in the error path? > The original code didn't have it either, hence the question. I suspect that is a bug. In reality, if you can't access the EFI System Table because you fail to map it I would guess you are going to crash very, very quickly anyhow.
Powered by blists - more mailing lists