From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968292AbdAEHmz (ORCPT ); Thu, 5 Jan 2017 02:42:55 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:36034 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967180AbdAEHmr (ORCPT ); Thu, 5 Jan 2017 02:42:47 -0500 Date: Thu, 5 Jan 2017 08:42:21 +0100 From: Ingo Molnar To: Nicolai Stange Cc: Matt Fleming , Ard Biesheuvel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Mika =?iso-8859-1?Q?Penttil=E4?= , Dan Williams Subject: Re: [PATCH v2 1/2] x86/efi: don't allocate memmap through memblock after mm_init() Message-ID: <20170105074221.GA1777@gmail.com> References: <20161222102340.2689-1-nicstange@gmail.com> <20161223145206.GC16838@codeblueprint.co.uk> <878tr6jqoa.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878tr6jqoa.fsf@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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() and from efi_free_boot_services() as well. > >> > >> Fixes: 4bc9f92e64c8 ("x86/efi-bgrt: Use efi_mem_reserve() to avoid copying image data") > >> Signed-off-by: Nicolai Stange > > > Could you also modify efi_fake_memmap() to use your new > > efi_memmap_alloc() function for consistency > > Sure. > > I'm planning to submit another set of patches addressing the (bounded) > memmap leaking in anything calling efi_memmap_unmap() though. In the > course of doing so, the memmap allocation sites will get touched anyway: > I'll have to store some information about how the memmap's memory has > been obtained. Will that patch be intrusive? If yes then we'll need to keep this a separate urgent patch to fix the v4.9 regression that Dan Williams reported. I can apply the fix to efi/urgent and get it to Linus straight away if you guys agree. Thanks, Ingo