From: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
To: joeyli <jlee-IBi9RG/b67k@public.gmane.org>
Cc: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
"Lee,
Chun-Yi" <joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address
Date: Thu, 30 Jul 2015 13:09:16 +0100 [thread overview]
Message-ID: <20150730120916.GD2725@codeblueprint.co.uk> (raw)
In-Reply-To: <20150730111819.GK15651-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
On Thu, 30 Jul, at 07:18:19PM, joeyli wrote:
>
> In the above case, just simply accessing EFI variable through efivars to
> reproduce issue:
>
> linux-aiip:~ # hexdump -C /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c
> Killed
>
> [ 257.856185] BUG: unable to handle kernel paging request at fffffffefd244e60 <=== address is in Runtime Data region
> [ 257.863200] IP: [<ffffffff81457cdd>] virt_efi_get_variable+0x5d/0xa0
> [ 257.869586] PGD 1a0c067 PUD 13b0ae063 PMD 13b0bc063 PTE 0
> [ 257.875056] Oops: 0000 [#1] SMP
> [...snip]
> [ 258.149804] RIP [<ffffffff81457cdd>] virt_efi_get_variable+0x5d/0xa0
> [ 258.156273] RSP <ffff8800ba07fd78>
> [ 258.159769] CR2: fffffffefd244e60
> [ 258.163090] ---[ end trace 9edb589760c07d3e ]---
>
> 0xfffffffefd244e60 is covered by Runtime Data region after hibernate resumed:
>
> [ 0.125865] efi: mem26: [Runtime Data |RUN| | | | |WB|WT|WC|UC] pa=[0x00000000bb3e5000-0x00000000bb445000) va=[0xfffffffefd1e5000-0xfffffffefd245000) (0MB)
> 0xfffffffefd244e60
>
> But this va address didn't mapped to any pa in hibernating kernel (image kernel):
>
> [ 0.111002] efi: mem24: [Runtime Code |RUN| | | | |WB|WT|WC|UC] pa=[0x00000000bb385000-0x00000000bb3e5000) va=[0xfffffffefd585000-0xfffffffefd5e5000) (0MB)
> [ 0.125883] efi: mem25: [Runtime Data |RUN| | | | |WB|WT|WC|UC] pa=[0x00000000bb3e5000-0x00000000bb445000) va=[0xfffffffefd3e5000-0xfffffffefd445000) (0MB)
> 0xfffffffefd244e60 <=== no mapping
> [ 0.140764] efi: mem29: [Boot Data | | | | | |WB|WT|WC|UC] pa=[0x00000000bb7ff000-0x00000000bb800000) va=[0xfffffffefd1ff000-0xfffffffefd200000) (0MB)
>
>
> So, when call EFI runtime services, got problem.
Why is the new kernel calling the EFI runtime services via the old
mappings?
--
Matt Fleming, Intel Open Source Technology Center
WARNING: multiple messages have this Message-ID (diff)
From: Matt Fleming <matt@codeblueprint.co.uk>
To: joeyli <jlee@suse.com>
Cc: Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
"Lee, Chun-Yi" <joeyli.kernel@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address
Date: Thu, 30 Jul 2015 13:09:16 +0100 [thread overview]
Message-ID: <20150730120916.GD2725@codeblueprint.co.uk> (raw)
In-Reply-To: <20150730111819.GK15651@linux-rxt1.site>
On Thu, 30 Jul, at 07:18:19PM, joeyli wrote:
>
> In the above case, just simply accessing EFI variable through efivars to
> reproduce issue:
>
> linux-aiip:~ # hexdump -C /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c
> Killed
>
> [ 257.856185] BUG: unable to handle kernel paging request at fffffffefd244e60 <=== address is in Runtime Data region
> [ 257.863200] IP: [<ffffffff81457cdd>] virt_efi_get_variable+0x5d/0xa0
> [ 257.869586] PGD 1a0c067 PUD 13b0ae063 PMD 13b0bc063 PTE 0
> [ 257.875056] Oops: 0000 [#1] SMP
> [...snip]
> [ 258.149804] RIP [<ffffffff81457cdd>] virt_efi_get_variable+0x5d/0xa0
> [ 258.156273] RSP <ffff8800ba07fd78>
> [ 258.159769] CR2: fffffffefd244e60
> [ 258.163090] ---[ end trace 9edb589760c07d3e ]---
>
> 0xfffffffefd244e60 is covered by Runtime Data region after hibernate resumed:
>
> [ 0.125865] efi: mem26: [Runtime Data |RUN| | | | |WB|WT|WC|UC] pa=[0x00000000bb3e5000-0x00000000bb445000) va=[0xfffffffefd1e5000-0xfffffffefd245000) (0MB)
> 0xfffffffefd244e60
>
> But this va address didn't mapped to any pa in hibernating kernel (image kernel):
>
> [ 0.111002] efi: mem24: [Runtime Code |RUN| | | | |WB|WT|WC|UC] pa=[0x00000000bb385000-0x00000000bb3e5000) va=[0xfffffffefd585000-0xfffffffefd5e5000) (0MB)
> [ 0.125883] efi: mem25: [Runtime Data |RUN| | | | |WB|WT|WC|UC] pa=[0x00000000bb3e5000-0x00000000bb445000) va=[0xfffffffefd3e5000-0xfffffffefd445000) (0MB)
> 0xfffffffefd244e60 <=== no mapping
> [ 0.140764] efi: mem29: [Boot Data | | | | | |WB|WT|WC|UC] pa=[0x00000000bb7ff000-0x00000000bb800000) va=[0xfffffffefd1ff000-0xfffffffefd200000) (0MB)
>
>
> So, when call EFI runtime services, got problem.
Why is the new kernel calling the EFI runtime services via the old
mappings?
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2015-07-30 12:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 4:32 [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address Lee, Chun-Yi
2015-07-30 4:32 ` Lee, Chun-Yi
[not found] ` <1438230757-30840-1-git-send-email-jlee-IBi9RG/b67k@public.gmane.org>
2015-07-30 7:53 ` H. Peter Anvin
2015-07-30 7:53 ` H. Peter Anvin
[not found] ` <55B9D806.7030705-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2015-07-30 8:03 ` Borislav Petkov
2015-07-30 8:03 ` Borislav Petkov
[not found] ` <20150730080323.GD8984-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2015-07-30 10:11 ` Matt Fleming
2015-07-30 10:11 ` Matt Fleming
[not found] ` <20150730101131.GB2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 11:09 ` joeyli
2015-07-30 11:09 ` joeyli
[not found] ` <20150730110959.GJ15651-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
2015-07-30 11:18 ` joeyli
2015-07-30 11:18 ` joeyli
[not found] ` <20150730111819.GK15651-empE8CJ7fzk2xCFIczX1Fw@public.gmane.org>
2015-07-30 12:09 ` Matt Fleming [this message]
2015-07-30 12:09 ` Matt Fleming
[not found] ` <20150730120916.GD2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 12:31 ` joeyli
2015-07-30 12:31 ` joeyli
2015-07-30 13:17 ` Matt Fleming
[not found] ` <20150730131723.GG2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 13:39 ` joeyli
2015-07-30 13:39 ` joeyli
2015-07-30 14:05 ` Matt Fleming
[not found] ` <20150730140542.GI2725-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-30 14:16 ` joeyli
2015-07-30 14:16 ` joeyli
2015-08-19 16:31 ` Matt Fleming
2015-08-20 1:05 ` joeyli
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=20150730120916.GD2725@codeblueprint.co.uk \
--to=matt-mf/unelci9gs6ibeejttw/xrex20p6io@public.gmane.org \
--cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=jlee-IBi9RG/b67k@public.gmane.org \
--cc=joeyli.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=x86-DgEjT+Ai2ygdnm+yROfE0A@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 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.