Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2017-01-05 Thread Nicolai Stange
Ard Biesheuvel writes: > On 5 January 2017 at 10:15, Nicolai Stange wrote: >> So, are you Ok with only taking the other review comment, namely >> >> "modify efi_fake_memmap() to use your new efi_memmap_alloc() function >>for consistency" >> >> into account for a v3? >> > > Yes, that should

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2017-01-05 Thread Ard Biesheuvel
On 5 January 2017 at 10:15, Nicolai Stange wrote: > Ard Biesheuvel writes: > >> On 5 January 2017 at 07:42, Ingo Molnar wrote: >>> >>> * Nicolai Stange wrote: >>> Matt Fleming writes: > On Thu, 22 Dec, at 11:23:39AM, Nicolai Stange wrote: >> So, after memblock is gone, allo

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2017-01-05 Thread Nicolai Stange
Ard Biesheuvel writes: > On 5 January 2017 at 07:42, Ingo Molnar wrote: >> >> * Nicolai Stange wrote: >> >>> Matt Fleming writes: >>> >>> > On Thu, 22 Dec, at 11:23:39AM, Nicolai Stange wrote: >>> >> So, after memblock is gone, allocations should be done through >>> >> the "normal" >>> >> page

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2017-01-05 Thread Ard Biesheuvel
On 5 January 2017 at 07:42, Ingo Molnar wrote: > > * Nicolai Stange wrote: > >> Matt Fleming writes: >> >> > On Thu, 22 Dec, at 11:23:39AM, Nicolai Stange wrote: >> >> So, after memblock is gone, allocations should be done through the >> >> "normal" >> >> page allocator. Introduce a helper, efi

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2017-01-05 Thread Dave Young
On 01/05/17 at 08:42am, Ingo Molnar wrote: > > * Nicolai Stange wrote: > > > Matt Fleming writes: > > > > > On Thu, 22 Dec, at 11:23:39AM, Nicolai Stange wrote: > > >> So, after memblock is gone, allocations should be done through the > > >> "normal" > > >> page allocator. Introduce a helper,

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2017-01-04 Thread Ingo Molnar
* Nicolai Stange wrote: > Matt Fleming writes: > > > On Thu, 22 Dec, at 11:23:39AM, Nicolai Stange wrote: > >> So, after memblock is gone, allocations should be done through the "normal" > >> page allocator. Introduce a helper, efi_memmap_alloc() for this. Use > >> it from efi_arch_mem_reserve

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2017-01-04 Thread Dan Williams
On Thu, Dec 22, 2016 at 2:23 AM, Nicolai Stange wrote: > With commit 4bc9f92e64c8 ("x86/efi-bgrt: Use efi_mem_reserve() to avoid > copying image data"), efi_bgrt_init() calls into the memblock allocator > through efi_mem_reserve() => efi_arch_mem_reserve() *after* mm_init() > has been called. > >

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2016-12-23 Thread Nicolai Stange
Matt Fleming writes: > On Thu, 22 Dec, at 11:23:39AM, Nicolai Stange wrote: >> So, after memblock is gone, allocations should be done through the "normal" >> page allocator. Introduce a helper, efi_memmap_alloc() for this. Use >> it from efi_arch_mem_reserve() and from efi_free_boot_services() as

Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2016-12-23 Thread Matt Fleming
On Thu, 22 Dec, at 11:23:39AM, Nicolai Stange wrote: > With commit 4bc9f92e64c8 ("x86/efi-bgrt: Use efi_mem_reserve() to avoid > copying image data"), efi_bgrt_init() calls into the memblock allocator > through efi_mem_reserve() => efi_arch_mem_reserve() *after* mm_init() > has been called. > > In

[PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init()

2016-12-22 Thread Nicolai Stange
With commit 4bc9f92e64c8 ("x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data"), efi_bgrt_init() calls into the memblock allocator through efi_mem_reserve() => efi_arch_mem_reserve() *after* mm_init() has been called. Indeed, KASAN reports a bad read access later on in efi_free_boot_s