Linux, UEFI, and Chromebooks (was RE: [PATCH 0/4] EFI 1:1 mapping)

2014-02-09 Thread Yuhong Bao
> On Mon, Jun 03, 2013 at 09:35:07AM -0700, James Bottomley wrote: >> On Mon, 2013-06-03 at 17:24 +0100, Matthew Garrett wrote: >>> That seems optimistic. Windows never calls QueryVariableInfo() during >>> boot services, so what makes you think doing so has ever been tested? >> >> It's used by the

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-04 Thread Borislav Petkov
On Mon, Jun 03, 2013 at 03:54:12PM +0100, Matt Fleming wrote: > On Mon, 03 Jun, at 03:32:52PM, Matthew Garrett wrote: > > We can only pass one set of addresses to SetVirtualAddressMap(), but it > > doesn't seem like there's any intrinsic reason we can't the runtime > > regions mapped to multiple

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matthew Garrett
On Mon, Jun 03, 2013 at 02:19:05PM -0700, James Bottomley wrote: > On Mon, 2013-06-03 at 19:11 +0100, Matthew Garrett wrote: > > No. I'm saying that calling it with the 1:1 map is something very > > different to the behaviour of Windows, and I'm saying that doing so is > > known to cause variable

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread James Bottomley
On Mon, 2013-06-03 at 19:11 +0100, Matthew Garrett wrote: > > > The problem there is that you're saying "In theory". We know that > > > Windows doesn't behave this way, so we have no legitimate expectation > > > that it'll work. We know that it doesn't on some Apple hardware. > > > > Fine, you s

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matthew Garrett
On Mon, Jun 03, 2013 at 11:05:03AM -0700, James Bottomley wrote: > On Mon, 2013-06-03 at 17:42 +0100, Matthew Garrett wrote: > > Why do you persist in this belief that all system vendors are going to > > have run a shell, let alone any kind of test suite? That runs counter to > > everything we've

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread James Bottomley
On Mon, 2013-06-03 at 17:42 +0100, Matthew Garrett wrote: > On Mon, Jun 03, 2013 at 09:35:07AM -0700, James Bottomley wrote: > > On Mon, 2013-06-03 at 17:24 +0100, Matthew Garrett wrote: > > > That seems optimistic. Windows never calls QueryVariableInfo() during > > > boot services, so what makes

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matthew Garrett
On Mon, Jun 03, 2013 at 09:35:07AM -0700, James Bottomley wrote: > On Mon, 2013-06-03 at 17:24 +0100, Matthew Garrett wrote: > > That seems optimistic. Windows never calls QueryVariableInfo() during > > boot services, so what makes you think doing so has ever been tested? > > It's used by the UEF

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread James Bottomley
On Mon, 2013-06-03 at 17:24 +0100, Matthew Garrett wrote: > On Mon, Jun 03, 2013 at 09:18:06AM -0700, James Bottomley wrote: > > > I don't entirely buy that. All EFI programs run with the physical > > address map, therefore every API an EFI program uses is also tested, at > > boot time only, obvi

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread James Bottomley
On Mon, 2013-06-03 at 16:21 +0100, Matthew Garrett wrote: > On Mon, Jun 03, 2013 at 07:38:02AM -0700, James Bottomley wrote: > > On Mon, 2013-06-03 at 15:30 +0100, Matthew Garrett wrote: > > > Windows calls SetVirtualAddressMap(), so the only way these systems have > > > been tested is with SetVir

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matthew Garrett
On Mon, Jun 03, 2013 at 09:18:06AM -0700, James Bottomley wrote: > I don't entirely buy that. All EFI programs run with the physical > address map, therefore every API an EFI program uses is also tested, at > boot time only, obviously. That seems optimistic. Windows never calls QueryVariableInfo

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matthew Garrett
On Mon, Jun 03, 2013 at 07:38:02AM -0700, James Bottomley wrote: > On Mon, 2013-06-03 at 15:30 +0100, Matthew Garrett wrote: > > Windows calls SetVirtualAddressMap(), so the only way these systems have > > been tested is with SetVirtualAddressMap(). > > I know, but that's not what I said. > > If

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matt Fleming
On Mon, 03 Jun, at 03:32:52PM, Matthew Garrett wrote: > We can only pass one set of addresses to SetVirtualAddressMap(), but it > doesn't seem like there's any intrinsic reason we can't the runtime > regions mapped to multiple virtual addresses. Indeed. That's the approach I took with my 1:1 ser

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread James Bottomley
On Mon, 2013-06-03 at 15:30 +0100, Matthew Garrett wrote: > On Mon, Jun 03, 2013 at 07:27:22AM -0700, James Bottomley wrote: > > > That's correct. I think not calling SetVirtualAddressMap() and just > > using a 1:1 mapping is far safer (having looked at what tianocore does > > for SetVirtualAddre

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matthew Garrett
On Mon, Jun 03, 2013 at 10:11:48AM +0200, Borislav Petkov wrote: > On Sun, Jun 02, 2013 at 11:56:20PM +0100, Matthew Garrett wrote: > > I've just run Windows 8 under a hacked up copy of OVMF that dumps > > the data passed to SetVirtualAddressMap. It seems that Windows *is* > > mapping the runtime s

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Matthew Garrett
On Mon, Jun 03, 2013 at 07:27:22AM -0700, James Bottomley wrote: > That's correct. I think not calling SetVirtualAddressMap() and just > using a 1:1 mapping is far safer (having looked at what tianocore does > for SetVirtualAddressMap()). The chances are that all the UEFI bioses > are only teste

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread James Bottomley
On Mon, 2013-06-03 at 10:11 +0200, Borislav Petkov wrote: > On Sun, Jun 02, 2013 at 11:56:20PM +0100, Matthew Garrett wrote: > > I've just run Windows 8 under a hacked up copy of OVMF that dumps > > the data passed to SetVirtualAddressMap. It seems that Windows *is* > > mapping the runtime services

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-03 Thread Borislav Petkov
On Sun, Jun 02, 2013 at 11:56:20PM +0100, Matthew Garrett wrote: > I've just run Windows 8 under a hacked up copy of OVMF that dumps > the data passed to SetVirtualAddressMap. It seems that Windows *is* > mapping the runtime services to higher addresses - so presumably the > 1:1 mapping is in addit

Re: [PATCH 0/4] EFI 1:1 mapping

2013-06-02 Thread Matthew Garrett
I've just run Windows 8 under a hacked up copy of OVMF that dumps the data passed to SetVirtualAddressMap. It seems that Windows *is* mapping the runtime services to higher addresses - so presumably the 1:1 mapping is in addition to the virtual mapping. -- Matthew Garrett | mj...@srcf.ucam.org