Re: [PATCH] efi: stub: call get_memory_map() to obtain map and desc sizes

2015-01-12 Thread Matt Fleming
On Fri, 09 Jan, at 10:55:29AM, Leif Lindholm wrote: > > I disagree. > The intent is clear, and you can not follow the current text and > provide a version that does not do the right thing. Only the MapKey > return is conditional on success. Tianocore does in fact appear to set the descriptor vers

Re: [PATCH] efi: stub: call get_memory_map() to obtain map and desc sizes

2015-01-09 Thread Mark Rutland
On Fri, Jan 09, 2015 at 10:55:29AM +, Leif Lindholm wrote: > On Fri, Jan 09, 2015 at 10:19:50AM +, Mark Rutland wrote: > > On Thu, Jan 08, 2015 at 07:09:22PM +, Ard Biesheuvel wrote: > > > On 8 January 2015 at 19:04, Mark Rutland wrote: > > > > Hi Ard, > > > > > > > > On Thu, Jan 08, 2

Re: [PATCH] efi: stub: call get_memory_map() to obtain map and desc sizes

2015-01-09 Thread Leif Lindholm
On Fri, Jan 09, 2015 at 10:19:50AM +, Mark Rutland wrote: > On Thu, Jan 08, 2015 at 07:09:22PM +, Ard Biesheuvel wrote: > > On 8 January 2015 at 19:04, Mark Rutland wrote: > > > Hi Ard, > > > > > > On Thu, Jan 08, 2015 at 05:51:47PM +, Ard Biesheuvel wrote: > > >> This fixes two minor

Re: [PATCH] efi: stub: call get_memory_map() to obtain map and desc sizes

2015-01-09 Thread Mark Rutland
On Thu, Jan 08, 2015 at 07:09:22PM +, Ard Biesheuvel wrote: > On 8 January 2015 at 19:04, Mark Rutland wrote: > > Hi Ard, > > > > On Thu, Jan 08, 2015 at 05:51:47PM +, Ard Biesheuvel wrote: > >> This fixes two minor issues in the implementation of get_memory_map(): > >> - Currently, it ass

Re: [PATCH] efi: stub: call get_memory_map() to obtain map and desc sizes

2015-01-08 Thread Ard Biesheuvel
On 8 January 2015 at 19:04, Mark Rutland wrote: > Hi Ard, > > On Thu, Jan 08, 2015 at 05:51:47PM +, Ard Biesheuvel wrote: >> This fixes two minor issues in the implementation of get_memory_map(): >> - Currently, it assumes that sizeof(efi_memory_desc_t) == desc_size, >> which is usually true

Re: [PATCH] efi: stub: call get_memory_map() to obtain map and desc sizes

2015-01-08 Thread Mark Rutland
Hi Ard, On Thu, Jan 08, 2015 at 05:51:47PM +, Ard Biesheuvel wrote: > This fixes two minor issues in the implementation of get_memory_map(): > - Currently, it assumes that sizeof(efi_memory_desc_t) == desc_size, > which is usually true, but not mandated by the spec. (This was added > inten

[PATCH] efi: stub: call get_memory_map() to obtain map and desc sizes

2015-01-08 Thread Ard Biesheuvel
This fixes two minor issues in the implementation of get_memory_map(): - Currently, it assumes that sizeof(efi_memory_desc_t) == desc_size, which is usually true, but not mandated by the spec. (This was added intentionally to allow future additions to the definition of efi_memory_desc_t). The