From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Laszlo Ersek <lersek@redhat.com>
Cc: Jordan L Justen <jordan.l.justen@intel.com>,
edk2-devel-01 <edk2-devel@ml01.01.org>,
Xen Devel <xen-devel@lists.xen.org>,
Anthony PERARD <anthony.perard@citrix.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Star Zeng <star.zeng@intel.com>
Subject: Re: OVMF/Xen, Debian wheezy can't boot with NX on stack (Was: Re: [edk2] [PATCH] OvmfPkg: prevent code execution from DXE stack)
Date: Wed, 9 Sep 2015 10:37:40 +0100 [thread overview]
Message-ID: <1441791460.24450.232.camel@citrix.com> (raw)
In-Reply-To: <55EFF6A202000078000A116F@prv-mh.provo.novell.com>
On Wed, 2015-09-09 at 01:06 -0600, Jan Beulich wrote:
> > > > On 09.09.15 at 00:23, <lersek@redhat.com> wrote:
> > On 09/08/15 19:26, Anthony PERARD wrote:
> > > And I get this on the console:
> > > Welcome to GRUB!
> > >
> > > !!!! X64 Exception Type - 0E(#PF - Page-Fault) CPU Apic ID -
> > > 00000000 !!!!
> > > RIP - 000000000F5F8918, CS - 0000000000000028, RFLAGS -
> > > 0000000000210206
> > > ExceptionData - 0000000000000011
> > > RAX - 0000000000000000, RCX - 0000000007FCE000, RDX -
> > > 0000000000000000
> > > RBX - 000000000B6092C0, RSP - 000000000F5F8590, RBP -
> > > 000000000B608EA0
> > > RSI - 000000000F5F8838, RDI - 000000000B608EA0
> > > R8 - 0000000000000000, R9 - 000000000B609200, R10 -
> > > 0000000000000000
> > > R11 - 000000000000000A, R12 - 0000000000000000, R13 -
> > > 000000000000001B
> > > R14 - 000000000B609360, R15 - 0000000000000000
> > > DS - 0000000000000008, ES - 0000000000000008, FS -
> > > 0000000000000008
> > > GS - 0000000000000008, SS - 0000000000000008
> > > CR0 - 0000000080000033, CR2 - 000000000F5F8918, CR3 -
> > > 000000000F597000
> > > CR4 - 0000000000000668, CR8 - 0000000000000000
> > > DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 -
> > > 0000000000000000
> > > DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 -
> > > 0000000000000400
> > > GDTR - 000000000F57BF18 000000000000003F, LDTR - 0000000000000000
> > > IDTR - 000000000EEA5018 0000000000000FFF, TR - 0000000000000000
> > > FXSAVE_STATE - 000000000F5F81F0
> > > !!!! Find PE image
> > /build/xen-unstable/src/xen-unstable/tools/firmware/ovmf-dir
> > -remote/Build
> > /OvmfX64/DEBUG_GCC49/X64/IntelFrameworkModulePkg/Universal/StatusCode/R
> > untime
> > Dxe/StatusCodeRuntimeDxe/DEBUG/StatusCodeRuntimeDxe.dll
> > (ImageBase=000000000F556000, EntryPoint=000000000F55628F) !!!!
> > >
> > > I did check with other guest (Windows, Ubuntu, Debian Jessie), and
> > > they are
> > > working correctly. Debian Wheezy is the only one that fail.
> >
> > I don't have an environment to reproduce this in. I think we should try
> > to understand this problem better, before deciding how to make it go
> > away.
> >
> > Please locate the "StatusCodeRuntimeDxe.debug" file in your Build
> > directory (ie. under the location listed in the error report). Then,
> > please disassemble it with "objdump -S". The fault location in the
> > disassembly can be found based on RIP, ImageBase and EntryPoint;
>
> I don't think the exact instruction at that address really matters. The
> main question appears to be why RIP and RSP both point into the
> same page (see also the subject of Anthony's mail).
I'm not 100% what is going on, but if this (executable code on stack) is
happening in grub is there something which is explicitly forbidden to UEFI
apps by the UEFI spec?
Or is it happening within UEFI itself based on a call from grub.efi?
> I.e. we need to
> spot the entity setting the stack to a page that also contains code,
> or placing code on the stack. That's unlikely to be found by identifying
> the instruction RIP points to, but rather (sadly not part of the state
> dump) something higher up the call chain.
>
> Jan
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-09-09 9:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1438963209-5241-1-git-send-email-lersek@redhat.com>
[not found] ` <0C09AFA07DD0434D9E2A0C6AEB0483100217660B@shsmsx102.ccr.corp.intel.com>
[not found] ` <55E01918.1090406@redhat.com>
2015-09-08 17:26 ` OVMF/Xen, Debian wheezy can't boot with NX on stack (Was: Re: [edk2] [PATCH] OvmfPkg: prevent code execution from DXE stack) Anthony PERARD
[not found] ` <20150908172615.GA1529@perard.uk.xensource.com>
2015-09-08 22:23 ` Laszlo Ersek
[not found] ` <55EF5FEE.7010701@redhat.com>
2015-09-09 7:06 ` Jan Beulich
2015-09-09 9:24 ` Laszlo Ersek
2015-09-09 9:37 ` Ian Campbell [this message]
2015-09-09 10:06 ` Jan Beulich
2015-09-09 10:48 ` Laszlo Ersek
[not found] ` <55F00E94.5040503@redhat.com>
2015-09-09 11:07 ` Ian Campbell
2015-09-09 11:30 ` Paolo Bonzini
2015-09-09 11:30 ` Laszlo Ersek
[not found] ` <55F0186E.3020001@redhat.com>
2015-09-09 11:41 ` Laszlo Ersek
[not found] ` <55F01873.5000505@redhat.com>
2015-09-10 3:21 ` [edk2] OVMF/Xen, Debian wheezy can't boot with NX on stack (Was: " Zeng, Star
2015-09-09 12:08 ` OVMF/Xen, Debian wheezy can't boot with NX on stack (Was: Re: [edk2] " Jan Beulich
2015-09-09 13:04 ` Laszlo Ersek
[not found] ` <55F02E58.3090504@redhat.com>
2015-09-09 13:10 ` Jan Beulich
2015-09-10 3:05 ` Zeng, Star
[not found] ` <55F0F35F.7060702@intel.com>
2015-09-10 9:38 ` Laszlo Ersek
2015-09-11 11:43 ` Laszlo Ersek
[not found] ` <55F2BE79.4010008@redhat.com>
2015-09-11 14:10 ` Josh Triplett
[not found] ` <20150911141035.GA6644@x>
2015-09-11 15:28 ` Laszlo Ersek
[not found] ` <55F2F306.2090104@redhat.com>
2015-09-11 19:30 ` Josh Triplett
[not found] ` <20150911193028.GB10395@x>
2015-09-11 21:27 ` Laszlo Ersek
[not found] ` <55F34744.2050308@redhat.com>
2015-09-11 23:06 ` Josh Triplett
[not found] ` <20150911230639.GA19127@x>
2015-09-14 10:57 ` Laszlo Ersek
2015-09-14 9:22 ` Ian Campbell
2015-09-14 11:07 ` Laszlo Ersek
[not found] ` <55F6AA56.4030105@redhat.com>
2015-09-14 12:23 ` Ian Campbell
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=1441791460.24450.232.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=anthony.perard@citrix.com \
--cc=edk2-devel@ml01.01.org \
--cc=jordan.l.justen@intel.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=star.zeng@intel.com \
--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.