From: "Jan Beulich" 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, 09 Sep 2015 07:10:20 -0600 Message-ID: <55F04BDC02000078000A14BA@prv-mh.provo.novell.com> References: <1438963209-5241-1-git-send-email-lersek@redhat.com> <0C09AFA07DD0434D9E2A0C6AEB0483100217660B@shsmsx102.ccr.corp.intel.com> <55E01918.1090406@redhat.com> <20150908172615.GA1529@perard.uk.xensource.com> <55EF5FEE.7010701@redhat.com> <55EFF6A202000078000A116F@prv-mh.provo.novell.com> <1441791460.24450.232.camel@citrix.com> <55F00E94.5040503@redhat.com> <55F03D4702000078000A1431@prv-mh.provo.novell.com> <55F02E58.3090504@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55F02E58.3090504@redhat.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Laszlo Ersek Cc: Ian Campbell , Jordan L Justen , edk2-devel-01 , Xen Devel , "Gabriel L. Somlo (GMail)" , Gary Lin , Anthony PERARD , Paolo Bonzini , Star Zeng List-Id: xen-devel@lists.xenproject.org >>> On 09.09.15 at 15:04, wrote: > On 09/09/15 14:08, Jan Beulich wrote: >>>>> On 09.09.15 at 12:48, wrote: >> However, I would want to suggest an even more dynamic approach: >> Assuming that within the core UEFI code it ought to be possible to >> flip between executable and non-executable mapping of the stack, >> and considering that PE headers can carry target version numbers, >> how about reverting to an executable stack as long as there's at >> least one binary loaded that isn't claiming to be 2.5 compatible? > > This would require very intrusive changes (to be implemented by people > other than me). Other concerns I have: > > - I'm not sure if UEFI applications have any means to advertize what > revision of the specification they target. (As you mention.) They can (as I said). Whether the image loader in UEFI actually looks at the data today is another thing, as is whether everyone makes sure their binaries say so. And then again I realize that usually one would rather state the minimum version required than that of the specification a binary was built against, so perhaps the idea was a bad one anyway. Jan