From: Ian Campbell <ian.campbell@citrix.com>
To: Roy Franz <roy.franz@linaro.org>
Cc: Keir Fraser <keir@xen.org>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, xen-devel <xen-devel@lists.xen.org>,
Ross Lagerwall <ross.lagerwall@citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v3 1/2] efi: Fix allocation problems if ExitBootServices() fails
Date: Tue, 2 Jun 2015 09:30:57 +0100 [thread overview]
Message-ID: <1433233857.15036.237.camel@citrix.com> (raw)
In-Reply-To: <CAFECyb8hJfDm4ZgvZwZxsbxE=e+Tuvxfp51e-Bcxg+x2k6OxGw@mail.gmail.com>
On Mon, 2015-06-01 at 14:20 -0700, Roy Franz wrote:
> On Mon, Jun 1, 2015 at 4:24 AM, Ian Campbell <ian.campbell@citrix.com> wrote:
> > On Mon, 2015-06-01 at 12:10 +0100, Jan Beulich wrote:
> >> >>> On 01.06.15 at 12:17, <ross.lagerwall@citrix.com> wrote:
> >> > If calling ExitBootServices() fails, the required memory map size may
> >> > have increased. When initially allocating the memory map, allocate a
> >> > slightly larger buffer (by an arbitrary 8 entries) to fix this.
> >> >
> >> > The ARM code path was already allocating a larger buffer than required,
> >> > so this moves the code to be common for all architectures.
> >> >
> >> > This was seen on the following machine when using the iscsidxe UEFI
> >> > driver. The machine would consistently fail the first call to
> >> > ExitBootServices().
> >> > System Information
> >> > Manufacturer: Supermicro
> >> > Product Name: X10SLE-F/HF
> >> > BIOS Information
> >> > Vendor: American Megatrends Inc.
> >> > Version: 2.00
> >> > Release Date: 04/24/2014
> >> >
> >> > Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> >>
> >> Provided ARM folks are happy with the reduced increase,
> >
> > Hi Roy,
> >
> > This patch[0] turns a +PAGE_SIZE in efi_arch_allocate_mmap_buffer into a
> > "8 * efi_mdesc_size" in the common code.
> >
> > The +PAGE_SIZE came from [1] so I think it is as arbitrary as the
> > +8*sizeof here.
> >
> > IOW this change looks ok to me, what do you think?
>
> Yeah, this should be fine. Most EFI allocations have page-size
> granularity within the firmware,
> so there wasn't much point doing something smaller. I haven't
> actually used firmware that
> changed the memmap size on ExitBootServices, so that size was not
> based on any actual
> firmware's behavior. The x86 allocations are done differently and are
> more size constrained,
> so a smaller value should be fine for common code.
>
> Roy
>
> Reviewed-by: Roy Franz <roy.franz@linaro.org>
Thanks. On that basis:
Acked-by: Ian Campbell <ian.campbell@citrix.com>
prev parent reply other threads:[~2015-06-02 8:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 10:17 [PATCH v3 1/2] efi: Fix allocation problems if ExitBootServices() fails Ross Lagerwall
2015-06-01 10:17 ` [PATCH v3 2/2] efi: Avoid calling boot services after ExitBootServices() Ross Lagerwall
2015-06-01 10:26 ` Andrew Cooper
2015-06-01 10:48 ` Jan Beulich
2015-06-01 11:10 ` [PATCH v3 1/2] efi: Fix allocation problems if ExitBootServices() fails Jan Beulich
2015-06-01 11:24 ` Ian Campbell
2015-06-01 21:20 ` Roy Franz
2015-06-02 8:30 ` Ian Campbell [this message]
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=1433233857.15036.237.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=keir@xen.org \
--cc=ross.lagerwall@citrix.com \
--cc=roy.franz@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.