From: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
To: Mathieu Poirier
<mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Shannon Zhao
<zhaoshenglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
sstabellini-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
stefano-yd54mjeZNzVBDgjK7y7TUQ@public.gmane.org,
julien.grall-5wv7dgnIgG8@public.gmane.org,
ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
shannon.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
peter.huangpeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] Xen: EFI: Parse DT parameters for Xen specific UEFI
Date: Wed, 11 May 2016 13:29:48 +0100 [thread overview]
Message-ID: <20160511122948.GV2839@codeblueprint.co.uk> (raw)
In-Reply-To: <CANLsYkxUyiUfdjm39SvhKSvmddPLFP3JFAeHpYuxgPyZfexw6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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.
next prev parent reply other threads:[~2016-05-11 12:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 8:32 [PATCH] Xen: EFI: Parse DT parameters for Xen specific UEFI Shannon Zhao
[not found] ` <1462523526-3172-1-git-send-email-zhaoshenglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-05-06 15:52 ` Mathieu Poirier
[not found] ` <CANLsYkxUyiUfdjm39SvhKSvmddPLFP3JFAeHpYuxgPyZfexw6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-11 12:29 ` Matt Fleming [this message]
2016-05-11 12:27 ` Matt Fleming
[not found] ` <20160511122730.GU2839-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-05-11 13:35 ` Shannon Zhao
2016-05-11 23:24 ` Matt Fleming
[not found] ` <20160511232444.GY2839-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-05-12 2:22 ` Shannon Zhao
[not found] ` <5733E8CF.3070004-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-05-12 10:04 ` Matt Fleming
[not found] ` <20160512100410.GA2728-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-05-12 10:58 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160511122948.GV2839@codeblueprint.co.uk \
--to=matt-mf/unelci9gs6ibeejttw/xrex20p6io@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=julien.grall-5wv7dgnIgG8@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mathieu.poirier-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=peter.huangpeng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=shannon.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=sstabellini-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=stefano-yd54mjeZNzVBDgjK7y7TUQ@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
--cc=xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org \
--cc=zhaoshenglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).