From: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
To: "Môshe van der Sterre" <me-A/3C56C7qwM@public.gmane.org>
Cc: Josh Triplett <josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org>,
Andy Lutomirski <luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: BGRT warns again on my system
Date: Thu, 2 Jun 2016 10:24:38 +0100 [thread overview]
Message-ID: <20160602092438.GD2658@codeblueprint.co.uk> (raw)
In-Reply-To: <574A6B5D.60200-A/3C56C7qwM@public.gmane.org>
On Sun, 29 May, at 06:09:01AM, Môshe van der Sterre wrote:
> ---
> arch/x86/platform/efi/efi-bgrt.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c
> index 6a2f569..a7fdb61 100644
> --- a/arch/x86/platform/efi/efi-bgrt.c
> +++ b/arch/x86/platform/efi/efi-bgrt.c
> @@ -19,6 +19,8 @@
> #include <linux/efi.h>
> #include <linux/efi-bgrt.h>
>
> +#include "../../mm/physaddr.h"
> +
> struct acpi_table_bgrt *bgrt_tab;
> void *__initdata bgrt_image;
> size_t __initdata bgrt_image_size;
> @@ -67,6 +69,11 @@ void __init efi_bgrt_init(void)
> return;
> }
>
> + if (!phys_addr_valid(bgrt_tab->image_address)) {
> + pr_notice("Ignoring BGRT: image address is bogus\n");
> + return;
> + }
> +
> image = memremap(bgrt_tab->image_address, sizeof(bmp_header), MEMREMAP_WB);
> if (!image) {
> pr_notice("Ignoring BGRT: failed to map image header memory\n");
> --
> 2.4.3
>
If this does indeed fix Andy's immediate issue (and it looks like
it would) I'm happy to apply this as an interim solution.
Once we have a persistent EFI memmap available at runtime on x86 we
should attempt to see whether the physical address in ->image_address
is covered by some region in that table. The persistent EFI memmap
patches should be posted in the coming weeks.
next prev parent reply other threads:[~2016-06-02 9:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-28 20:46 BGRT warns again on my system Andy Lutomirski
[not found] ` <CALCETrUJ2QoUSYY82Q1BN3niasiunktnrmdE9Lmi2PZnCJRdag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-28 22:25 ` Josh Triplett
2016-05-29 4:09 ` Môshe van der Sterre
[not found] ` <574A6B5D.60200-A/3C56C7qwM@public.gmane.org>
2016-06-02 9:24 ` Matt Fleming [this message]
[not found] ` <20160602092438.GD2658-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-06-19 13:14 ` Môshe van der Sterre
[not found] ` <57669AC0.7010905-A/3C56C7qwM@public.gmane.org>
2016-06-19 14:38 ` Josh Triplett
2016-06-19 14:57 ` Môshe van der Sterre
2016-06-20 5:38 ` Dave Young
[not found] ` <20160620053819.GB13633-0VdLhd/A9Pl+NNSt+8eSiB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2016-06-20 15:50 ` Josh Triplett
2016-06-23 12:01 ` Matt Fleming
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=20160602092438.GD2658@codeblueprint.co.uk \
--to=matt-mf/unelci9gs6ibeejttw/xrex20p6io@public.gmane.org \
--cc=josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=me-A/3C56C7qwM@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).